Open arimgibson opened 1 year ago
Hi @arimgibson indeed webpack is the main resource (ab)user here, but we haven't tested anything else (like esbuild or vite). 2GB RAM is also what we found out was necessary as a minimum from DigitalOcean to build the PWA.
Hmmm okay, good to have that context. If there are significant performance improvements, would a PR to Vite be considered? I'd be happy to get started on it, though might need some help deciphering the webpack.config.js 😅
I think we'd definitely be open to that, even if it's just on one of the packages. @MaKleSoft please correct me if I'm wrong.
The current build pipeline is definitely quite resource-intensive and wasteful, and I've been itching to get away from webpack and toward something simpler / more efficient like esbuild/vite for a while now. Unfortunately I have a feeling that replacing webpack completely could be quite an undertaking with a lot of risks and potential unintended side effects, and will likely require relatively intimate familiarity with the code base. So while I appreciate the offer, I think this might be a little bit too much for a first-time contributor 😅
The current build pipeline is definitely quite resource-intensive and wasteful, and I've been itching to get away from webpack and toward something simpler / more efficient like esbuild/vite for a while now. Unfortunately I have a feeling that replacing webpack completely could be quite an undertaking with a lot of risks and potential unintended side effects, and will likely require relatively intimate familiarity with the code base. So while I appreciate the offer, I think this might be a little bit too much for a first-time contributor 😅
Totally understand, y'all know your code the best! Lmk if I can help in anyway, even if that's just testing, creating an issue with details and tasks, etc. I might fork and mess around with too just for fun 😊
Thanks for understanding 😊 not trying to gate-keep or anything just want to save you the frustration of dealing with all the nitty-gritty details of our build pipeline. You can still give it a shot of course, just be aware that it might be tricker than expected and I can't guarantee that your efforts will result in something mergeable.
Trying to use Padloc on a lower tier VM provided through Linode and running into some memory heap issues. I'm wondering if it's possible that there's a memory leak occurring during the Webpack bundling, or if potentially switching to something like generally faster than Webpack like Vite might help with memory usage?
I wasn't able to find any benchmarks comparing memory usage between Vite and Webpack, but it seems strange that the PWA would require significant memory to be able to build. In the meantime, I'm upgrading my VM to try and get an idea of how much memory is needed, and might resort to bundling locally and then uploading to a lower tier VM.
Update: a VM with 2GB was able to build successfully after 114804ms. That's better than I was expecting to be honest, but I'd still be curious if the required memory could be brought down a bit.
With some direction, happy to investigate more; I don't have a good idea what next debugging steps might be. I might be able to submit a PR for migrating the PWA to Vite, but can't guarantee I'll have the time. Thanks!