- Notifications
You must be signed in to change notification settings - Fork1
Various performance baselines for typescript-eslint.
License
typescript-eslint/performance
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Various performance baselines for typescript-eslint.
You'll needhyperfine installed locally, such as withbrew install hyperfine
orwinget install hyperfine
.Seesharkdp/hyperfine#installation.
npm installnpm run generatenpm run measure
You can manually measure individual cases by runninghyperfine ../../node_modules/eslint/bin/eslint.js --ignore-failure --warmup 1
.
ThecaseEntries
values insrc/data.ts
can be modified to test:
files
: roughly how many generated files should be lintedlayout
: what rough shape of imports those files exhibit:"even"
: a single root-levelindex.ts
importing from roughly an even triangle shape of files"references"
: a single root-leveltsconfig.json
with project references to a few projects"wide"
: one root-levelindex.ts
importing from all files in the project
singleRun
: whether to enablesingle-run inference as a performance boosttypes
: whether to useparserOptions.project
orparserOptions.projectService
for typed linting
Right now,parserOptions.project
with single-run inference outperformsparserOptions.projectService
.This is a performance issue and we are investigating it as a bug.
┌───────┬───────────────────────┬───────────────────────┐│ files │ project (even layout) │ service (even layout) │├───────┼───────────────────────┼───────────────────────┤│ 1024 │ '2.371 s ± 0.029 s' │ '2.724 s ± 0.049 s' │└───────┴───────────────────────┴───────────────────────┘
Seetypescript-eslint/typescript-eslint#9571 Performance: parserOptions.projectService no longer outperforms parserOptions.project in typescript-eslint.
- Example measurements taken on an M1 Max Mac Studio with Node.js 22.12.0
- These results are similar across TypeScript versions: 5.0.4, 5.4.5, and 5.5.3
Thecomparisons/
directory contains details on more specific comparisons.See eachcomparisons/*.md
file for details on what's being measured.
Thetraces/
directory contains more specific traces for investigations.
✨ You might consider using0x for nice flamegraph visuals.
All comparisons were run on a common shape of linting: 1024 files with the "even" (triangle-shaped) imports layout.
Jake Bailey 🤔 | Josh Goldberg ✨ 🤔🚇🚧📆🔧 |
About
Various performance baselines for typescript-eslint.
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.