-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
plotly on jupyter creates HUGE notebooks file sizes #5056
Comments
thanks for the report @urirosenberg - I'll try to get someone to dig into this in the next cycle. (And thanks for providing the notebook - that will help a lot.) |
Hey @urirosenberg thanks for this! I'm not able to reproduce this, could you send more info about the environment you're running this in?
|
I am seeing the same thing in jupyter notebooks with the following environment:
There are two problems with
This can be very simply tested in a clean new notebook by running: import plotly.graph_objects as go
go.Figure() and then If you do this for If you render another empty figure in another cell, you get: This is indeed a huge problem as @urirosenberg says. In our case, we render notebooks with ~40 plotly plots in our documentation site and with |
For anyone getting here, a temporary workaround if you don't need to see your notebook offline is to change the default renderer at the top of the notebook: import plotly.io as pio
pio.renderers.default = "notebook_connected" |
@marthacryan please have a look when you can. |
I think the best solution here is to set |
no objection from me - thank you |
Hi, I can't say whether changing the default to It would be a bit sweeping the issue under the rug. And the issue itself doesn't look particularly hard to tackle (maybe I'm missing something that makes it more complex than it seems). |
I agree with @pfebrer, in my case, I need offline mode to be able to send reports via mail. Pre 6.0.0 version produced reports of roughly 5MB, and 6.0.0+ version produces 24MB plots, which is almost 5x regression in size. |
Hi, we are seeing an issue with plotly v6.0.0 where running in jupyter creates HUGE notebook files, resulting in crashed kernel and inability to save.
Sample code to reproduce the issue (full example can be found here):
Using plotly version 5.24.1, this generates a >1M file.
Using plotly version 6.0.0, this generates a 19M file.
Looking at the v6.0.0 notebook source json file, I see massive amounts of JS code.
The text was updated successfully, but these errors were encountered: