You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(linter/plugins): pre-populate cache of EnterExit objects (#20187)
Perf optimization to visitor compilation.
Previously in the main loop for non-leaf visitors in `finalizeCompiledVisitor`, every turn of the loop had to check if cache contains an `EnterExit` object it can reuse, and to create a new one if not.
Instead, pre-populate the cache of `EnterExit` object *before* that main loop, to ensure there are always enough in the main loop.
After warmup over the first few files, the cache will be populated with enough `EnterExit` objects to service every file, and the "populate" loop will be skipped entirely.
This converts what was 1 branch per loop iteration to 1 highly predictable branch per file.
0 commit comments