helm-www icon indicating copy to clipboard operation
helm-www copied to clipboard

Build of website is slow

Open TerryHowe opened this issue 2 months ago • 2 comments

My computer is slow to begin with, but I am surprised how long it takes to build the website. Any thoughts on why that is and any way to speed it up?

TerryHowe avatar Nov 05 '25 13:11 TerryHowe

i'm guessing you mean a full build (yarn build), not running dev for only one locale (yarn start)?

a full build (yarn build) does take a long time locally, because of all the languages (i guess because of the rich language features in docusaurus).

but after the first build locally, subsequent builds use the existing /build dir as a cache, so it's many x faster.

i built a netlify caching plugin for docusaurus to help with this for previews and branch builds. it has a method for clearing the cache per branch or for all PRs from any single PR by changing the cache version on the netlify config file. the netlify beta cache api is supposedly up to 10x faster, and I also have a work in progress plug-in for that in the same directory, but we're not using it because I didn't quite get it to work and it's better anyway, so we're using the GA file cache method for now, and I added some read me info about keeping an eye on the cash API as it matures (or maybe someone can get it to work with the beta API now, I just had trouble with it).

all of that is to mainly share what I'm aware of around a full build including all the locales (yarn build).

but did you mean that it's slow running the site locally for dev (yarn run)?

scottrigby avatar Nov 05 '25 17:11 scottrigby

Definitely slow building on my laptop which doesn't have much RAM, but also the preview build seems to take forever. Maybe the preview I was looking at wasn't using the cache you are talking about.

TerryHowe avatar Nov 05 '25 19:11 TerryHowe