You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was doing some work regarding the assets and I was wondering why the current production build size is significantly higher than the 0.28.0 release's (checked at try.decidim.org vs building the production assets at develop).
I noticed that there is some significant amount of emoji data added to the decidim_core.js bundle after migrating to Emoji-mart (#12243).
Look at the size of the decidim_core.js bundle (make sure you are looking at the production asset)
Compare the size with the same bundle created for version 0.28.0 (e.g. try.decidim.org)
See the difference in sice
Expected behavior
I would expect the bundle size not to increase significantly when new versions are released.
Screenshots
No response
Stacktrace
No response
Extra data
Device: (any)
Device OS: (any)
Browser: (any)
Decidim Version: 0.29.0.dev
Decidim installation: local
Additional context
This difference is caused by the emoji data being included in the bundle itself.
I know this was a privacy problem in previous versions as the emoji data was loaded dynamically through a CDN.
But I believe that this data could be shipped in a separate bundle and loaded dynamically when the page has emoji selectors which would decrease the decidim_core.js bundle size.
While the data is gzipped in production during transfer, we should still try to minimize the bundle sizes for optimal performance.
There are probably many other places that could be optimized but I just happened to notice this as a potential "big win" opportunity.
Another one that I noticed when comparing commits between develop and release/0.28-stable (but not as significant) was the date picker introduced at #11768. Building this alone produces a bundle of 61kB (20kB when gzipped).
The text was updated successfully, but these errors were encountered:
Describe the bug
I was doing some work regarding the assets and I was wondering why the current production build size is significantly higher than the 0.28.0 release's (checked at try.decidim.org vs building the production assets at
develop
).I noticed that there is some significant amount of emoji data added to the
decidim_core.js
bundle after migrating to Emoji-mart (#12243).The significant line is this:
decidim/decidim-core/app/packs/src/decidim/input_emoji.js
Line 1 in acbb110
Which includes this:
https://github.com/missive/emoji-mart/blob/16978d04a766eec6455e2e8bb21cd8dc0b3c7436/packages/emoji-mart-data/sets/15/native.json
Which is > 400 kB when unpacked.
To Reproduce
develop
decidim_core.js
bundle (make sure you are looking at the production asset)Expected behavior
I would expect the bundle size not to increase significantly when new versions are released.
Screenshots
No response
Stacktrace
No response
Extra data
Additional context
This difference is caused by the emoji data being included in the bundle itself.
I know this was a privacy problem in previous versions as the emoji data was loaded dynamically through a CDN.
But I believe that this data could be shipped in a separate bundle and loaded dynamically when the page has emoji selectors which would decrease the
decidim_core.js
bundle size.While the data is gzipped in production during transfer, we should still try to minimize the bundle sizes for optimal performance.
There are probably many other places that could be optimized but I just happened to notice this as a potential "big win" opportunity.
Another one that I noticed when comparing commits between develop and release/0.28-stable (but not as significant) was the date picker introduced at #11768. Building this alone produces a bundle of 61kB (20kB when gzipped).
The text was updated successfully, but these errors were encountered: