Cam McHenry @camchenry.com · Aug 18

Trying some new oxlint optimizations. This PR has gone over several iterations in the last few months and the core idea is simple: don't run rules for files if they don't apply (using an AST node bitset lookup). The result: linting is around 15% faster in practice.

39 likes 5 replies

?

Replies

Jeroen Engels · Aug 18

Are there so many rules that look for such specific nodes to make for such a big performance change? That's quite surprising!

Erika · Aug 18

Sounds like fun work, I hope you had fun working on it

Arnaud Barré · Aug 18

Are you running the whole visitor for each rule? In my idea you run one visitor pass, where for each node you call the rules that want to visit that node so that if no node matches the rules, it doesn't cost to have it around

Cam McHenry · Aug 18

github.com/oxc-project/... Note that this is still very much a work in progress. Probably won't be merged for a bit as the hard part is ensuring correctness when skipping rules.

Josh Goldberg · Aug 18

Huh, great finding! Very interesting.