The step I'd add after the GNU time run: when a build dies on a small box, dmesg | grep -i oom tells you which process the OOM killer actually picked, and it is not always the build. A modest swap file also turns a killed session into a slow one, which is easier to measure. Did you see the VS Code server itself grow much with extensions installed?