sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

consider switching to rspack #7769

Open williamstein opened 2 months ago

williamstein commented 2 months ago

See https://rspack.dev/

It's supposed to be a drop in replacement for webpack that is faster. If it works and uses less RAM than webpack, this could be very helpful for cocalc dev, since RAM usage with webpack is terrible.

Motivation: saw this being considered for jupyterlab: https://github.com/jupyterlab/jupyterlab/issues/15035

williamstein commented 1 week ago

. If it works and uses less RAM than webpack

It seems to just sit there at 2.5 GB in dev mode, instead of blowing up to 40 GB+ resident which is what webpack does to me after a while:

image

It takes about 8 seconds to deal with our entire frontend in dev mode, and about 20 seconds in prod mode. That's a game changing order of magnitude faster than webpack5, with every optimization I could think of!

rspack totally kicks ass.