Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Optimized main.min.js #52

Closed
simeonackermann opened this issue May 24, 2018 · 6 comments
Closed

Optimized main.min.js #52

simeonackermann opened this issue May 24, 2018 · 6 comments
Assignees
Projects

Comments

@simeonackermann
Copy link
Collaborator

Currently its size is about 1.1 MB which too much.

Why it's so big?

Find ways too optimize and minimize.

@simeonackermann
Copy link
Collaborator Author

Webpack build message:

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
main.min.js (1.03 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (1.03 MiB)
main.min.js
WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

@k00ni
Copy link
Member

k00ni commented May 24, 2018

Why is that a problem at all? Did the user need something else besides the main.min.js?

@simeonackermann
Copy link
Collaborator Author

Ok, the 1.1 MB main.min.js included an experimental routing feature with a lot of translated routing transcriptions.
Without its about 700 KiB, what is closer to the size I had in mind.

But I think this could be still optimized. Beside the main.min.js users have to download CSS files, Images and leaflet tiles. Especially for mobile devices it should be as less as possible.

@k00ni
Copy link
Member

k00ni commented May 24, 2018

How much is the size of all files in total?

@simeonackermann
Copy link
Collaborator Author

Our JS, CSS and image files are about 1.1 MB. The quite biggest part is the main.js
The leaflet map tiles for the center of leipzig are 300 KB

@simeonackermann
Copy link
Collaborator Author

But I think the current fixed build size (600KB) is OK and we can close this issue.

Another issue might be performance improvements. Eg test if a React component should update.

Round 4 automation moved this from To do to Done May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Round 4
  
Done
Development

No branches or pull requests

2 participants