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

Add support for deferred loading of bokehjs' bundles #13547

Open
wants to merge 1 commit into
base: branch-3.5
Choose a base branch
from

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Nov 24, 2023

This is an experiment in adding support for deferred bundles. Bundles are resolved the same as previously, but instead of including them via resource management, they are included either by name or respective URL in document's serialized representation and resolved by bokehjs when needed. This work for both standalone and server embedding. Additional bundles can be requested with subsequent document patches.

In the example below we can see that only bokeh.js was loaded with the initial HTML page, but we can use widgets and math text:

image

Tentatively including in 3.4 milestone, but it may take some time before this is fully incorporated into bokeh's embed.

@mattpap mattpap added this to the 3.4 milestone Nov 24, 2023
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (0021c18) 92.58% compared to head (a3beb7d) 92.58%.

Additional details and impacted files
@@              Coverage Diff               @@
##           branch-3.4   #13547      +/-   ##
==============================================
- Coverage       92.58%   92.58%   -0.01%     
==============================================
  Files             325      325              
  Lines           20729    20748      +19     
==============================================
+ Hits            19192    19209      +17     
- Misses           1537     1539       +2     

@mattpap mattpap force-pushed the mattpap/10166_deferred_bundles branch 2 times, most recently from 387dd5d to 4d6f490 Compare November 24, 2023 20:58
@bryevdv
Copy link
Member

bryevdv commented Nov 26, 2023

Will this intersect with browser caching of CDN loads?

@mattpap
Copy link
Contributor Author

mattpap commented Nov 27, 2023

Will this intersect with browser caching of CDN loads?

This uses fetch() which by default obeys HTTP caching, e.g.:

image

(this requires "Disable cache (while DevTools is open)" to be unchecked while verifying this).

@mattpap mattpap force-pushed the mattpap/10166_deferred_bundles branch from 4d6f490 to a3beb7d Compare February 20, 2024 01:19
@mattpap mattpap changed the base branch from branch-3.4 to branch-3.5 March 14, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gallery examples loading all bundles
2 participants