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

Allow standalone plotly.min.js when creating graphs #189

Closed
devdanzin opened this issue Jul 7, 2023 · 0 comments
Closed

Allow standalone plotly.min.js when creating graphs #189

devdanzin opened this issue Jul 7, 2023 · 0 comments
Assignees

Comments

@devdanzin
Copy link
Collaborator

When creating graphs, wily currently inlines the contents of plotly.min.js in HTML files, making their size around 3.4MB each. When creating a lot of graphs, this quickly adds up to a lot of space. For example, bulk creating graphs for every metric for every file that ever existed in wily's repository takes around 5GB in about 1500 HTML files.

Plotly has an option to create plotly.min.js once, in the same directory, and reference it from the HTML file. It's enabled by calling plotly.offline.plot with include_plotlyjs="directory". It reduces the size of the same 1500 graphs from 5GB to under 100MB.

I'm not sure adding this feature would be in scope for wily, but I have it working locally and could contribute a PR if it's desirable. It would also add a new CLI option for graph to enable this behavior.

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

1 participant