oxc-project / oxc-project/backlog
Linter: Reduce size of thread pool when linting small number of files
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
If linting only a small number of files, and import plugin is not used, there's no need to create a thread pool of threads. Number of threads in pool could be cmp::min(files_to_lint_count, cpu_core_count).
In particular, people sometimes want to lint just a single file, or only staged files.
I'm not sure what cost of launching threads is. If it's extremely cheap, and it's not easy to know in advance how many files are going to be linted, this change may not be worthwhile.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the linter entry point that creates the thread pool and inspect how the number of files to lint is known. Measure or test linting a single file and a small file set, then confirm the pool size is bounded by the file count when the import plugin is unused without changing the import-plugin path.
Written by the indexing model from the issue text.
Assessment
- Domain
- performance, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100