Optimizing FCP/LCP by caching raw-view module lookups

I can still reproduce the performance benefits using performance API in Firefox private-mode (Linux).

Testing http://localhost:4200/latest
Time spent in renderTopicListItem is down to ~190 ms from ~290 ms.

My Discourse testing-instance has many topics with many answers and many different authors - data pulled from a productive-instance. This results in lots of elements to be rendered.
Maybe this is the difference in our benchmarks?


Pre-rendering of content below-the-fold

Discourse pre-renders 30 topics on page ‘latest’. Then the content gets displayed for the first time (FCP). Above-the-fold there are only ~12 topics visible.

Same for a topic page: 20 posts pre-rendered, but max of 6 one-line-posts are visible above-the-fold.

This might be another point of optimization for FCP.