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

Minimize the number of CSS files requested #36186

Closed
tylersmalley opened this issue May 7, 2019 · 6 comments
Closed

Minimize the number of CSS files requested #36186

tylersmalley opened this issue May 7, 2019 · 6 comments
Labels
Team:Operations Team label for Operations Team

Comments

@tylersmalley
Copy link
Contributor

When we first introduced SCSS support for plugins, we did so by loading the resulting CSS on page-load. This was fine then, but with 31 plugins now doing so results in a performance bottleneck due to maxing out the parallel requests to the domain.

One option would be to serve the enabled plugins CSS file in a single request. A route could be created for this and the result cached if necessary. The goal would be to avoid any un-necessary action during plugin install.

@tylersmalley tylersmalley added the Team:Operations Team label for Operations Team label May 7, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@joshdover
Copy link
Contributor

I'd like to bump this issue. We've had two customer complaints that I know of recently so I dug into this a bit and I think it's dramatically slowing down how long it takes for the frontend to start being usable.

In an initial load, I saw 95 requests. The number of requests is a problem for us because most browsers will limit the number of open connections a window may have at a time. This causes a major bottleneck in loading all the files needed to render the page.

In the most severe example, vendor.bundle.dll.js (the largest file by far) is delayed by 2.32s before it even starts the request because the CSS files are loaded first. This creates a domino effect for anything loaded after this file (all of the other bundles wait for this file to load before they start as well).

@joshdover joshdover self-assigned this Aug 21, 2019
@AlonaNadler
Copy link

AlonaNadler commented Sep 10, 2019

@joshdover any progress with the PR for this issue? I got another compliant in 6.7.1 mostly the navigation between applications and on login

@joshdover
Copy link
Contributor

@AlonaNadler In my draft PR, I got a couple wins that shaved off ~2s. I need to take another look at our caching headers set on these bundles which may improve it quite a bit more.

I'll probably pick this back up in the next week or so. It should be backportable to 6.8 if that's the route we want to go.

@ppf2
Copy link
Member

ppf2 commented Nov 14, 2019

So far, I only see mention of 6.x in this issue. This gets worse on 7.x given that we have more applications on 7.x and each application requires loading a CSS file on every page?

@joshdover joshdover removed their assignment Feb 4, 2020
@mshustov
Copy link
Contributor

mshustov commented Jul 3, 2020

Can it be closed? There are not separate CSS files per a plugin bundle with the new @kbn/optimizer architecture.

@spalger spalger closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Operations Team label for Operations Team
Projects
None yet
Development

No branches or pull requests

7 participants