I ran yarn oxlint --debug=timings on our codebase at work and was surprised to see eslint/no-loop-func having such a large chunk of the runtime:
Finished in 8.7s on 12010 files with 278 rules using 11 threads.
Rule timings:
Rule Time (ms) Relative Calls Source
---------------------------------------------- ---------- -------- ------- ------
eslint/no-loop-func 254.337 23.1% 54883 native
eslint/no-unused-vars 85.605 7.8% 11975 native
eslint/no-underscore-dangle 76.536 7.0% 3685784 native
import/extensions 31.538 2.9% 161441 native
eslint/no-shadow 29.547 2.7% 12010 native
react/exhaustive-deps 23.118 2.1% 149431 native
We should see if we can optimize it. (note: the 8.7s runtime is almost entirely due to type-aware rules)
https://github.com/oxc-project/oxc/blob/610f4c7b0bdac95148373fab8798e8fcbecec820/crates/oxc_linter/src/rules/eslint/no_loop_func.rs
I ran
yarn oxlint --debug=timingson our codebase at work and was surprised to seeeslint/no-loop-funchaving such a large chunk of the runtime:We should see if we can optimize it. (note: the 8.7s runtime is almost entirely due to type-aware rules)
https://github.com/oxc-project/oxc/blob/610f4c7b0bdac95148373fab8798e8fcbecec820/crates/oxc_linter/src/rules/eslint/no_loop_func.rs