ka-lite
ka-lite copied to clipboard
Optimize Learn tab critical rendering path
The Learn tab is the most used section of the app, but it also loads a large amount of assets that significantly increase the page load time. Bringing it down to a sub-1 second loading time even for the Ainol tablets would be a significant improvement in the user experience for students.
Related to #2618.
I think that part of this will be in devising a more sophisticated API (actually an API rather than a json file) for loading topic data.
Yeah, a good portion of that initial JS time may also be spent in recursively parsing the entire topic tree and converting it to Backbone models and collections.
I would also reiterate here that having properly built client side resources (js and css) will probably be our biggest win here. To quote https://developers.google.com/web/fundamentals/performance/critical-rendering-path/optimizing-critical-rendering-path
Minimize the number of critical resources. Minimize the number of critical bytes. Minimize the critical path length.
Number of critical resources would be drastically reduced by compiling our js and css files into bigger chunks, and reducing the critical bytes can be managed by making the 4.8Mb Topics.json unnecessary on first page load.