-
-
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
investigate ways to reduce bundle size #4817
Comments
There are some obvious but fairly small things we could do here:
The bigger thing will be to reduce duplication by subclassing attributes rather than repeating the same definition a million times. Like there are only a few flavors of for single-valued layout fonts like from plotly.basedatatypes import BaseLayoutFont as _BaseLayoutFont
class Font(_BaseLayoutFont):
_parent_path_str = "layout.title"
_path_str = "layout.title.font" and for a trace font that supports arrays, like from plotly.basedatatypes import BaseTraceArrayFont as _BaseTraceArrayFont
class TextFont(_BaseTraceArrayFont):
_parent_path_str = "bar"
_path_str = "bar.textfont" Finally, I wonder if we can get rid of all the explicit |
I'm going to check about turning all the generated code into a zip file (at setup stage or before) and using zipimport. Then the unnecessary comments are not really interesting and mostly get comrpessed away. |
The plotly.py bundle is approx. 19 Mbyte, which will be a problem for WASM deploys. We should investigate ways to reduce its size.
cf plotly/dash#3050 and #3294
The text was updated successfully, but these errors were encountered: