-
Notifications
You must be signed in to change notification settings - Fork 0
Initial page load of genspectrum downloads 1.6M - need to fix web component import #538
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
Comments
I add minify, this isn't enough:
So then I add the playform compress library to further compress - this still leads to a 1MB sized BaseLayout file:
|
Looking at the file in more detail I see large comment sections with typescript - on closer review these are all web components. The base layout loads all web components on page load: https://github.com/GenSpectrum/dashboards/blob/main/website/src/layouts/base/BaseLayout.astro#L34 - this goes against good practice - we components should only be loaded when used. |
You should also minify that npm package code, no need for comments, white
space etc.
Do you mean on the components side? I tried minifying the code on the dashboards level but this doesn't remove the comments for some reason - you can see what I tried here: #536
|
Uh oh!
There was an error while loading. Please reload this page.
Discovered by @corneliusroemer, when loading the page over 1M of un-minified astro-related js files are downloaded (note that transferred and resources is the same implying no compression has been performed) - this is a real strain on page load times - especially as this is just for the data-less main page.

The text was updated successfully, but these errors were encountered: