๐ŸŒ AIๆœ็ดข & ไปฃ็† ไธป้กต
Skip to content

typescript-eslint/performance

typescript-eslint Performance Comparisons

Various performance baselines for typescript-eslint.

๐Ÿ‘ช All Contributors: 1 ๐Ÿค Code of Conduct: Kept ๐Ÿ“ License: MIT ๐Ÿ’ช TypeScript: Strict

Usage

You'll need hyperfine installed locally, such as with brew install hyperfine or winget install hyperfine. See sharkdp/hyperfine#installation.

npm install
npm generate
npm measure

Measured Attributes

The caseEntries values in src/data.ts can be modified to test:

  • files: roughly how many generated files should be linted
  • layout: what rough shape of imports those files exhibit:
    • "even": a single root-level index.ts importing from roughly an even triangle shape of files
    • "references": a single root-level tsconfig.json with project references to a few projects
    • "wide": one root-level index.ts importing from all files in the project
  • singleRun: whether to enable single-run inference as a performance boost
  • types: whether to use parserOptions.project or parserOptions.projectService for typed linting

Results

Right now, parserOptions.project outperforms parserOptions.projectService. This is a performance issue and we are investigating it as a critical bug for v8.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ files โ”‚ project (even)       โ”‚ project (references) โ”‚ service (even)       โ”‚ service (references) โ”‚
โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 128   โ”‚ '1.149 s ยฑ  0.030 s' โ”‚ '1.135 s ยฑ  0.008 s' โ”‚ '1.178 s ยฑ  0.010 s' โ”‚ '1.736 s ยฑ  0.012 s' โ”‚
โ”‚ 512   โ”‚ '1.636 s ยฑ  0.009 s' โ”‚ '1.656 s ยฑ  0.004 s' โ”‚ '1.895 s ยฑ  0.007 s' โ”‚ '2.613 s ยฑ  0.020 s' โ”‚
โ”‚ 1024  โ”‚ '2.353 s ยฑ  0.013 s' โ”‚ '2.399 s ยฑ  0.016 s' โ”‚ '3.130 s ยฑ  0.017 s' โ”‚ '4.034 s ยฑ  0.061 s' โ”‚
โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Contributors

Josh Goldberg โœจ
Josh Goldberg โœจ

๐Ÿ’ป ๐Ÿ–‹ ๐Ÿ“– ๐Ÿค” ๐Ÿš‡ ๐Ÿšง ๐Ÿ“† ๐Ÿ”ง

About

Various performance baselines for typescript-eslint.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks