Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we add a *strict* (or *debug*) mode that runs Plotly.validate on every newPlot and update call before attempting to draw? #1741

Closed
etpinard opened this issue May 29, 2017 · 7 comments
Labels
feature something new

Comments

@etpinard
Copy link
Contributor

which would essentially be a more general way to resolve #1736

I'm thinking this strict/debug mode would be set as a config argument. We could either log the attribute errors (as Plotly.validate currently does) or throw an error.

@etpinard etpinard changed the title Should we add add *strict* (or *debug*) mode that runs Plotly.validate on every newPlot and update call before attempting to draw? Should we add a *strict* (or *debug*) mode that runs Plotly.validate on every newPlot and update call before attempting to draw? May 29, 2017
@rreusser
Copy link
Contributor

rreusser commented May 29, 2017

Random question: does a bundle with stripped metadata affect at all what or how it's able to report errors? (Otherwise I like the idea of this as a config argument and of reporting as much/helpful information as we can.)

@etpinard
Copy link
Contributor Author

does a bundle with stripped metadata affect at all what or how it's able to report errors

In its current implementation, Plotly.validate doesn't log the attribute descriptions, so no, it wouldn't matter.

@etpinard
Copy link
Contributor Author

etpinard commented Sep 12, 2017

cc @phxnsharp if you weren't aware of this.

@phxnsharp
Copy link

This sounds like exactly what we would prefer. Is there a sense of what type of performance hit this would involve?

@etpinard
Copy link
Contributor Author

Is there a sense of what type of performance hit this would involve?

At the moment, Plotly.validate is fairly fast. It clocks in at no worse than 50ms. Plotly.validate's execution time, in its current state, scales with the number of "data" and "layout" attributes set.

That said, if we choose to implement #1998, Plotly.validate will likely slow down a little bit. It we only check for data arrays lengths, the performance hit will be small. But if we choose to check for invalid data items (e.g. null in scatter marker traces), this will make Plotly.validate's execution time scale with the length of the data array - which will slow it down considerably for graphs with many data points.

@etpinard
Copy link
Contributor Author

cross-referencing #167

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

4 participants