hunghvu / hungvu.tech

The official repository for hungvu.tech
https://hungvu.tech
3 stars 0 forks source link

Investigate very low performance for home page #81

Closed hunghvu closed 10 months ago

hunghvu commented 10 months ago

Many issues such as high TTFB, LCP, script blocking time, etc.

hunghvu commented 10 months ago

This might be because there is no depth limit for requesting list of articles. Consequently, it requests body of all articles, which is very large and deeply nested. Hence performance exponentially degrades as the number of article increases.

hunghvu commented 10 months ago

This also leads to the question of.

hunghvu commented 10 months ago

Or maybe, just cache the page? The downside is new articles won't show up before the validation period, but does that even matter for a personal site?

Related issue: https://github.com/hunghvu/hungvu.tech/issues/38. We previously made fetch dynamic because otherwise, build is broken.

hunghvu commented 10 months ago

Considering that the back end is established, we won't see an issue like #38 anymore, but still, b41f0f4 is only a temporary solution for this rather severe ticket.

hunghvu commented 10 months ago

The problem also because the front end is use client, effectively make it a React SPA, so performance is heavily impacted. We need to move away from PrimeReact timeline component.

hunghvu commented 10 months ago

This issue seems to be a duplication of #83 and #79, so we will close. Regarding core web vitals improvement, it will be in new tickets, with more specific details.