ka-lite icon indicating copy to clipboard operation
ka-lite copied to clipboard

Optimize Learn tab critical rendering path

Open aronasorman opened this issue 10 years ago • 3 comments

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.

aronasorman avatar Nov 06 '14 19:11 aronasorman

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.

rtibbles avatar Nov 07 '14 20:11 rtibbles

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.

jamalex avatar Nov 08 '14 00:11 jamalex

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.

rtibbles avatar Nov 11 '14 01:11 rtibbles