File size optimization
See original GitHub issueCurrently nsi-id-presets.min.json
is about 8MB in size which is a lot. A possible way to solve this problem is to split it per country. There will be duplicated information across files, but it will load much faster for all users. A side effect would be that it will reduce loading times of the editors and speed up the validation speed of brands.
Such change will require changes in the build process and changes to how iD and RapiD handle brands (which is why I’m tagging @tyrasd and @bhousel). Are you in support of such change and would it be too hard to implement?
Also, are there any other data consumers that will be affected? If there are, it would be nice to leave both “systems” to coexist and add a folder in dist
where the new per country method is used.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:14 (9 by maintainers)
I now implemented
Loading all the presets (normal presets + localization + international brand presets + presets of the country one is in) during startup now takes 0.6s compared to 2.7s before on my phone. So roughly 4 times faster now.
From my end, no, because I already wrote the script to take apart the nsi.json myself. That script contains additional stuff - as outlined in my last message - that will probably not be done if the files were already separate this way in the
dist
folder.