Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Reducing size of JS bundle #336

Closed
gmaclennan opened this issue May 1, 2020 · 0 comments
Closed

Reducing size of JS bundle #336

gmaclennan opened this issue May 1, 2020 · 0 comments

Comments

@gmaclennan
Copy link
Member

gmaclennan commented May 1, 2020

Related to #133 which is focussed on the size of the built app installer.

This issue is focussed on the JS bundle used in the electron renderer. The size of the JavaScript that is loaded in the front-end affects the initial load and parse time as well as the size of the app.

Currently the renderer JS code is not bundled - it is required at runtime from node_modules. Changing the Webpack config to bundle all files results in a bundle that is 11.17Mb. This is already an improvement on unbundled code. The main size hogs are:

7.34Mb  iD Editor
1.50Mb  @react-pdf + Yoga layout
761kb   mapbox-gl-js
744kb   @fortawesome svg icons
342kb   material-ui
264kb   Application code

The biggest size hog is iD Editor. A lot of that is probably multi-lingual support for presets and background map layer info + all the OSM icon sets.

There are numerous smaller modules like iconv-lite and different versions of core-js that take up about 150kb each that could also be trimmed if needed.

@digidem digidem locked and limited conversation to collaborators Oct 1, 2021
@ErikSin ErikSin closed this as completed Oct 1, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants