Description
Suggestion
Coming over from #9575 -> #10561: @dmichon-msft created a very tantalizing proof-of-concept that might help improve linting performance. Copying the description here:
Overview
This PR optimizes
populateGlobalsFromLib
by deduplicating work to calculate the set of variables available in the configuredlibs
array, and by only injecting implicit variable definitions for variables whose names appear in the file being analyzed.As a consequence of only injecting implicit variables that are actually used in the file, we can avoid the overhead of lint rules spending time processing irrelevant injected globals, for example in
typescript-eslint/no-redeclare
andtypescript-eslint/naming-convention
.
Nobody's had the dedicated time to take that PR to completion. But it'd be really good if we could get it in! That should involve cleaning up the test coverage from the PR, testing it to make sure it's still better for performance, and sending a new PR.
Additional Info
If you send a PR that builds off the code in #10561, please add a co-author attribution to credit the original author.
💖