NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
41 stars 26 forks source link

Speed up time to first contentful paint #2027

Open laurenwalker opened 2 years ago

laurenwalker commented 2 years ago

MetacatUI currently has an embarrassingly high time to first contentful paint. Testing knb.ecoinformatics.org results in a whopping 3.6 seconds from initial page load to first contentful paint.

The symptoms

The causes

My recommendations

Performance breakdown with specific recommendations

I tracked the breakdown of network requests made by MetacatUI before contentful paint. Here is the timeline.

Initial app setup (240ms-800ms]

App scaffolding [800ms-2.8sec]

Header and Footer render [2.8sec-3.4sec]

Content render [3.4sec-3.6sec]

Layout shift screenshots

This timeline causes the following layout shift. Here's the KNB theme as an example:

Screen Shot 2022-06-08 at 12 22 46 PM

Screen Shot 2022-06-08 at 12 23 30 PM Screen Shot 2022-06-08 at 12 23 38 PM

Screen Shot 2022-06-08 at 12 23 45 PM

Screen Shot 2022-06-08 at 12 24 04 PM

robyngit commented 1 year ago

Just to supplement this, here are results from a light house test for the main KNB landing page and the KNB search page. Lauren's recommendations will have the most impact, but there are some additional small, easy tasks that we can start with like preloading important images.