Project startup extremely slow

Whenever my project restarts, it often takes several minutes to build and start up. The same code takes about a second to build on my laptop, and it used to be much faster.

I’m using Rollup with the Vue and node-resolve plugins, as well as some server-side code. I added the perf option to Rollup, and it gave me the following timings:

src/client.js → build/client.js...
created build/client.js in 3m 36.3s
# BUILD: 193752ms, 29.1 MB / 47.1 MB
## parse modules: 140253ms, 25.8 MB / 43.9 MB
- plugin 0 (node-resolve) - resolveId: 136ms, 134 kB / 43.7 MB
- plugin 0 (node-resolve) - resolveId (async): 91489ms, 19.7 MB / 43.9 MB
load modules: 185028ms, 55.7 MB / 47.8 MB
- plugin 0 (node-resolve) - load: 101ms, 5.83 kB / 43.7 MB
- plugin 1 (VuePlugin) - load: 26ms, 44.9 kB / 43.7 MB
- plugin 2 (stdin) - load: 1ms, 4.08 kB / 43.5 MB
- plugin 1 (VuePlugin) - transform: 486ms, 592 kB / 47.9 MB
- plugin 1 (VuePlugin) - transform (async): 51303ms, 11.7 MB / 47.9 MB
generate ast: 48083ms, -803 kB / 43.7 MB
analyse ast: 30033ms, 11 MB / 47.7 MB
- plugin 1 (VuePlugin) - resolveId: 2ms, 24.9 kB / 43.7 MB
## analyse dependency graph: 12868ms, 1.91 MB / 45.8 MB
## mark included statements: 40250ms, 1.2 MB / 47 MB
treeshaking pass 1: 5624ms, 591 kB / 46.4 MB
treeshaking pass 2: 1073ms, 259 kB / 46.7 MB
treeshaking pass 3: 508ms, -456 kB / 46.2 MB
treeshaking pass 4: 488ms, 829 kB / 47.1 MB
treeshaking pass 5: 529ms, -29.5 kB / 47 MB
treeshaking pass 6: 1292ms, -226 kB / 46.8 MB
treeshaking pass 7: 12541ms, 674 kB / 47.5 MB
treeshaking pass 8: 16997ms, 76.3 kB / 47.6 MB
treeshaking pass 9: 501ms, -757 kB / 46.8 MB
treeshaking pass 10: 635ms, 226 kB / 47 MB
## generate chunks: 380ms, 112 kB / 47.1 MB
# GENERATE: 21881ms, 38.2 MB / 85.4 MB
render modules: 5485ms, 864 kB / 48.1 MB
render format: 4988ms, 18.5 MB / 66.6 MB
sourcemap: 11261ms, 18.4 MB / 85 MB

In the container stats, the CPU usually peaks at around 7% during startup (I’ve seen it go much higher in the past when testing some other modules). The memory seems to correspond to the numbers above.

Is there any way I can speed it up?

Link to source: https://glitch.com/edit/#!/phase-manuscript

hi @JBYoshi - if you remix that app, do you still encounter a very slow build time? I tried remixing it and it built in just several seconds. Let me know and I can then investigate why this particular app is experiencing a large build time.

I tried that, and the remix built in just a few seconds. It felt impressively fast compared to what I’m used to!