File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -292,14 +292,16 @@ func main() {
292
292
}
293
293
}
294
294
295
- if ! isServeOrWatch && nonFlagCount <= 1 {
295
+ if ! isServeOrWatch {
296
296
// If this is not a long-running process and there is at most a single
297
297
// entry point, then disable the GC since we're just going to allocate
298
298
// a bunch of memory and then exit anyway. This speedup is not
299
299
// insignificant. We don't do this when there are multiple entry points
300
300
// since otherwise esbuild could unnecessarily use much more memory
301
301
// than it might otherwise need to process many entry points.
302
- debug .SetGCPercent (- 1 )
302
+ if nonFlagCount <= 1 {
303
+ debug .SetGCPercent (- 1 )
304
+ }
303
305
} else if ! isStdinTTY && ! isWatchForever {
304
306
// If stdin isn't a TTY, watch stdin and abort in case it is closed.
305
307
// This is necessary when the esbuild binary executable is invoked via
You can’t perform that action at this time.
0 commit comments