It should be a general goal to reduce the bundle size of FROG. This will make loading faster, especially on slow devices, cell phones etc, lowers load on the server, and is especially important for embedding activities (where you want a single activity to load as fast as possible).
Currently, the minified gzipped code is 2MB, which is a lot. I will soon have a PR that enables dynamic loading of all ActivityRunners, this brings it down to 1.6MB. I am also trying to separate all the teacher tools from the students, but somehow that is not working yet.
Looking at what takes the most space:
Un-gzipped, the size is 5.4 MB total
4.6 MB of which is node_modules
Some of this should be removed (react-bootstrap), or unified (we have both react-rte, react-draft-wysiwyg and draft-js, all rich text editing plugins). Others should be loaded on-demand (victory, react-json-view). The problem is that currently all the Dashboards and the Learning Items are always loaded - we need to change the file structure etc if we want these to be dynamically loaded too.
The goal should be to get the initial load to under 0.5 MB, ideally ~300kb.
It should be a general goal to reduce the bundle size of FROG. This will make loading faster, especially on slow devices, cell phones etc, lowers load on the server, and is especially important for embedding activities (where you want a single activity to load as fast as possible).
Currently, the minified gzipped code is 2MB, which is a lot. I will soon have a PR that enables dynamic loading of all ActivityRunners, this brings it down to 1.6MB. I am also trying to separate all the teacher tools from the students, but somehow that is not working yet.
Looking at what takes the most space: Un-gzipped, the size is 5.4 MB total 4.6 MB of which is node_modules
The biggest packages are: react-rte 400 react-draft-wysiwyg 300 react-bootstrap-table 250 katex 230 victory-chart 300 draft-js 173 react-bootstrap 167 react-json-view 150
Some of this should be removed (react-bootstrap), or unified (we have both react-rte, react-draft-wysiwyg and draft-js, all rich text editing plugins). Others should be loaded on-demand (victory, react-json-view). The problem is that currently all the Dashboards and the Learning Items are always loaded - we need to change the file structure etc if we want these to be dynamically loaded too.
The goal should be to get the initial load to under 0.5 MB, ideally ~300kb.