Ciao @Ed_S - quale versione di Discourse stavi usando per questi test? Aggiorniamo regolarmente ember-cli e i suoi add-on, quindi voglio solo assicurarmi che stiamo guardando la stessa cosa.
Inoltre, quanti core CPU hanno le tue VM? 1? (puoi controllare eseguendo lscpu nella console)
In modo che tutti lavoriamo con gli stessi dati, potresti provare a eseguire:
/var/discourse/launcher enter app
cd /var/www/discourse/app/assets/javascripts/discourse
apt-get update && apt-get install time
NODE_OPTIONS='--max-old-space-size=2048' /usr/bin/time -v yarn ember build -prod
Sul mio droplet di test (1 CPU, 1 GB di RAM, 2 GB di swap), vedo questo:
Command being timed: "yarn ember build -prod"
User time (seconds): 369.74
System time (seconds): 22.62
Percent of CPU this job got: 81%
Elapsed (wall clock) time (h:mm:ss or m:ss): 8:02.73
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 774912
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 253770
Minor (reclaiming a frame) page faults: 1158920
Voluntary context switches: 519269
Involuntary context switches: 383328
Swaps: 0
File system inputs: 7521784
File system outputs: 316304
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
Stiamo usando strumenti ember abbastanza standard qui, quindi non sono sicuro che ci sia molto che possiamo fare in termini di configurazione per ridurre l’utilizzo della memoria. Il nostro obiettivo a lungo termine è passare all’uso di Embroider, che potrebbe darci più opzioni.