swyxio / swyxdotio

This is the repo for swyx's blog - Blog content is created in github issues, then posted on swyx.io as blog pages! Comment/watch to follow along my blog within GitHub
https://swyx.io
MIT License
325 stars 43 forks source link

Slow page load due to > 1MB `listContent.json` in HTML response #471

Open mattrossman opened 1 year ago

mattrossman commented 1 year ago

Loading the site is slow for me, the initial HTML document takes several seconds and is > 1MB.

image

The bulk of this comes from the serialized listContent.json script tag

image

This appears to contain the full content of all blog posts on the site. I experience this on all pages of the site.

swyxio commented 1 year ago

thanks for this - yeah i should fix that!

swyxio commented 1 year ago

image

doesnt seem to appear on single blog pages at least. not in network requests

not inlined in html

image

swyxio commented 1 year ago

image

pagespeed insights blames the server response time. i should prerender or cache better

swyxio commented 1 year ago

https://www.webpagetest.org/result/230309_AiDcTC_7S0/1/details/#waterfall_view_step1

the response time here is embarrassingly slow. i have no idea what makes something take 6 seconds to render image

swyxio commented 1 year ago

@mattrossman landing page still not good but at least fixed the perf for the individual blog pages. gonna keep working on it. thanks for the push, feel embarrassed image