Skip to content

Efficient deep copy of graph_objs without validation #1078

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

Closed
jonmmease opened this issue Jul 28, 2018 · 1 comment
Closed

Efficient deep copy of graph_objs without validation #1078

jonmmease opened this issue Jul 28, 2018 · 1 comment

Comments

@jonmmease
Copy link
Contributor

Consider the following:

fig1 = go.Figure(...)
fig2 = go.Figure(fig1)

Right now, the construction of fig2 involves the re-validation of all of the properties in fig1. But this is unnecessarily since the properties are guaranteed to be valid in fig1.

Also consider this case:

go.Figure(data=[go.Scatter(marker=go.scatter.Marker(...))])

Here, go.Scatter should not rerun the marker validation logic, and go.Figure should not rerun the scatter trace validation logic.

We should have a fast performance path for these cases that just performs a deepcopy on the raw dict and splices that into a new object, without any additional validation.

See https://community.plot.ly/t/how-to-copy-figure-or-trace-object-deepcopy-no-longer-working/12166

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, so 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 backlog. Thanks for your help - @gvwilson

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

No branches or pull requests

2 participants