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

Avoid bundling unused resources in saved files, notebooks and on server #2796

Closed
philippjfr opened this issue Sep 30, 2021 · 2 comments · Fixed by #2919
Closed

Avoid bundling unused resources in saved files, notebooks and on server #2796

philippjfr opened this issue Sep 30, 2021 · 2 comments · Fixed by #2919
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@philippjfr
Copy link
Member

Currently we inject all bokeh bundles in a server context and when saving to HTML. In the server/notebook context this is because we cannot know which bundles might be needed at a later stage and in the save context we currently do it because bokeh does not correctly discover that panel.js requires both the widget and table bundles to be available. In the past this was not a huge issue since the supplemental bundles were either required anyway for Panel (widget/table) or they were small (webGL), however with the addition of a 1.8 MB MathJax bundle in Bokeh 2.4 this is a real issue now.

The save context is easy to fix I think by simply including a dummy DataTable model when asking bokeh to generate the JS bundle (although it'd be nice if we had explicit control here). For the notebook and server case I would at minimum like to offer an option for a user to explicitly disable the inclusion of certain bundles (specifically webGL and MathJax) and maybe even ask a developer to explicitly enable the MathJax bundle if it is not included in the app on load.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Sep 30, 2021
@philippjfr philippjfr added this to the v0.12.5 milestone Sep 30, 2021
@mattpap
Copy link
Collaborator

mattpap commented Sep 30, 2021

Shouldn't have this issue been open on bokeh, or is panel's handling of resources so different for this to be handled separately? We have to solve this problem in bokeh anyway.

@philippjfr
Copy link
Member Author

Wanted to discuss it with you in person before filing a Bokeh issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants