Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Large assets #92

Open
Rudloff opened this issue Dec 2, 2020 · 6 comments
Open

Large assets #92

Rudloff opened this issue Dec 2, 2020 · 6 comments

Comments

@Rudloff
Copy link
Owner

Rudloff commented Dec 2, 2020

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  fonts/fa-solid-900.svg (798 KiB)
  main.bundle.js (702 KiB)
  style.bundle.js (353 KiB)
  test.bundle.js (258 KiB)

I tried to optimize fa-solid-900.svg with image-webpack-loader but it is still quite large.
As for the JS bundles, we probably need to split them in smaller bundles.

@Rudloff
Copy link
Owner Author

Rudloff commented Dec 3, 2020

I moved the CSS to a separate file and minified it, so it is now slightly better:

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  fonts/fa-solid-900.svg (798 KiB)
  main.bundle.js (695 KiB)

@KristjanESPERANTO
Copy link
Contributor

Are the seven icons in the menu the only place where Font Awesome is used? If this is the case, we could replace Font Awesome with seven small svg files or include them as inline svg in a css file.

@Rudloff
Copy link
Owner Author

Rudloff commented Dec 7, 2020

It is used in the menu, but also on markers (with Leaflet.awesome-markers). But yes, we only use a small number of icons, so we should either replace them or only extract the icons we need from FontAwesome.

Rudloff added a commit that referenced this issue Dec 7, 2020
Rudloff added a commit that referenced this issue Dec 7, 2020
@Rudloff
Copy link
Owner Author

Rudloff commented Dec 7, 2020

I used fontmin-webpack to only keep the icons we are actually using.

Now the only remaining problem is that main.bundle.js is still a bit big.

@KristjanESPERANTO
Copy link
Contributor

Did you already gzip this file?

https://css-tricks.com/snippets/htaccess/active-gzip-compression/

@Rudloff
Copy link
Owner Author

Rudloff commented Dec 7, 2020

Yes it is served gzipped, which means only ~180 KB are transferred to the browser instead of the full ~700 KB.

Rudloff added a commit that referenced this issue Mar 19, 2022
Fixed geocoder (#91)
Improved webpack pipeline
Optimisze icofonts (#92)
Removed useless dependencies
Added information about toilets (#101)
Extract TLD correctly (#102)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants