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

[Vue] Performance improvement: use scoped styles and load plugin styles on demand too #18983

Open
diosmosis opened this issue Mar 22, 2022 · 2 comments
Labels
c: Performance For when we could improve the performance / speed of Matomo.

Comments

@diosmosis
Copy link
Member

Another potential improvement to page load time: all of Matomo's styles are currently loaded synchronously in one request. It doesn't take much time, but there would be a performance improvement, if the file was smaller.

If the styles were moved to Vue modules as scoped styles, then for plugins that are loaded on demand, the styles could be removed from the main merged stylesheet.

To accomplish this:

Refs #18981 & #18980

@diosmosis diosmosis added the c: Performance For when we could improve the performance / speed of Matomo. label Mar 22, 2022
@heurteph-ei
Copy link

AFAIK, load several small files takes more time (and consumes more network resources) than lone one single bigger file...
But it depends on the number of (small) files you won't load thanks to your new behavior...

@diosmosis
Copy link
Member Author

Scoped styles are bundled, they are not loaded individually. The bundles would only be loaded individually if Matomo is modified to load them on demand w/ plugin JavaScript. Note that the primary purpose of this issue is to remove/lessen the initial larger synchronous request for styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo.
Projects
None yet
Development

No branches or pull requests

3 participants