Improvements to js build times in low-memory environments (May 2024)

Our official install guide lists 1GB of RAM (+2GB swap) as the minimum requirements for Discourse. This is still possible, but over the last few months it has become increasingly painful to rebuild Discourse with servers of this spec. This is primarily because of changes to our JS build tooling.

We’ve just landed these tweaks, which should significantly improve rebuild times on low-memory servers:

Given the number of variables it’s hard to promise exact numbers. But, in my tests on a DO droplet with 1GB RAM (+2GB swap), this reduced the ember build portion of a ./launcher rebuild app from ~45 minutes to ~15 minutes.

There may also be a slight speed improvement for machines with more RAM, but nothing too substantial.

If you run Discourse on a low-memory machine, please give it a try and let us know how you get on!

28 Likes

I’m sure I’m not alone here in this thinking, but this will really help self-hosters and keep their costs down, driving adoption, super!!

An excellent show of commitment to the community, thank you!

19 Likes

Nice!

I just did a test install and the whole thing, including droplet creation, (automatic) DNS configuration, getting SMTP credentials from Mailgun, and the rebuild with a bunch of plugins (plus deleting the droplet) took just 23 minutes. This is awesome, as I’d been running this test on an 8GB droplet because the 1GB was taking so darn long.

It looks like the 30 Minute Install is possible once again!

13 Likes