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

generated response includes 12k lines of css #77

Closed
jf--- opened this issue Mar 11, 2019 · 3 comments
Closed

generated response includes 12k lines of css #77

jf--- opened this issue Mar 11, 2019 · 3 comments

Comments

@jf---
Copy link

jf--- commented Mar 11, 2019

I noticed that when hosting a notebook with voila, that in the initial response, 12k lines of bootstrap css is included. While most js code is cached, this initial response is not and takes little under 3.00 seconds to complete. About 95% of the response data is the css code. It seems low hanging fruit to just link the dependency ( as is done for font-awesome ) or is served as a separate file, such that the browser can perform caching.

this applies to the template:

voila/share/jupyter/voila/template/default/nbconvert_templates/voila.tpl

here the css code is inlined in the template

whereas

voila/share/jupyter/voila/template/gridstack/nbconvert_templates/voila.tpl

inlines the bootstrap css

This reduces the response considerable...

@jf--- jf--- changed the title generated response include Bootstrap generated response includes 12k lines of css Mar 11, 2019
jf--- added a commit to jf---/voila that referenced this issue Mar 11, 2019
inlined bootstrap is now linked rather than inlined in initial response
@jf--- jf--- mentioned this issue Mar 11, 2019
@maartenbreddels
Copy link
Member

I am not sure #78 is the right solution, but I indeed think we should not inline all the css this way, I'll give it some thought.

@jf---
Copy link
Author

jf--- commented Mar 17, 2019

I am not sure #78 is the right solution

Agreed, personally I much prefer your #60 approach, closing the PR, leaving the issue open.

@SylvainCorlay
Copy link
Member

Now that we are loading CSS sepatetely (in master), I think that we can close this specific issue.

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

3 participants