We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd3bde2 commit a10531aCopy full SHA for a10531a
lib/Resolver.js
@@ -692,7 +692,11 @@ class Resolver {
692
}
693
newStack.add(stackEntry);
694
} else {
695
- newStack = new Set([stackEntry]);
+ // creating a set with new Set([item])
696
+ // allocates a new array that has to be garbage collected
697
+ // this is an EXTREMELY hot path, so let's avoid it
698
+ newStack = new Set();
699
+ newStack.add(stackEntry);
700
701
this.hooks.resolveStep.call(hook, request);
702
0 commit comments