Skip to content

perf: Concurrent tsconfig lookup per file#555

Merged
camc314 merged 15 commits intooxc-project:mainfrom
no-yan:concurrent-per-file-resolution
Jan 28, 2026
Merged

perf: Concurrent tsconfig lookup per file#555
camc314 merged 15 commits intooxc-project:mainfrom
no-yan:concurrent-per-file-resolution

Conversation

@no-yan
Copy link
Copy Markdown
Collaborator

@no-yan no-yan commented Jan 3, 2026

This PR optimizes tsconfig resolution by 75% by improving concurrency , resulting in ~75% faster resolution in large projects.
This removes a major bottleneck in large codebases; Kibana now completes resolution in ~3 seconds.

Project Before After
elastic/kibana 14.21s 3.29s
microsoft/vscode 1.16s 0.28s

fix #554

Benchmark (vs. main branch)

This PR is 40% faster than main at elastic/kibana (excluding node_modules).

Details

❯ sh ../run.sh cmp
Benchmark 1: trunk
  Time (mean ± σ):     19.865 s ±  0.362 s    [User: 39.647 s, System: 10.195 s]
  Range (min … max):   19.479 s … 20.196 s    3 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: baseline
  Time (mean ± σ):     28.448 s ±  0.666 s    [User: 37.079 s, System: 13.019 s]
  Range (min … max):   27.780 s … 29.113 s    3 runs

  Warning: Ignoring non-zero exit code.

Summary
  trunk ran
    1.43 ± 0.04 times faster than baseline

Note

Disclosure: I used some AI tools: Claude Code for prototype and writing tests, Gemini and ChatGPT for reviewing my code and improve my English.

@no-yan no-yan force-pushed the concurrent-per-file-resolution branch from 1ff598f to b7ba81a Compare January 3, 2026 08:35
@no-yan no-yan marked this pull request as ready for review January 4, 2026 12:47
@no-yan

This comment was marked as resolved.

@camc314 camc314 self-assigned this Jan 7, 2026
@no-yan no-yan marked this pull request as draft January 9, 2026 14:58
@no-yan
Copy link
Copy Markdown
Collaborator Author

no-yan commented Jan 9, 2026

Testing with aws/aws-cdk revealed failure to resolve tsconfig. Keeping this PR in draft status until the issue is resolved.

@camc314
Copy link
Copy Markdown
Contributor

camc314 commented Jan 9, 2026

Testing with aws/aws-cdk revealed failure to resolve tsconfig. Keeping this PR in draft status until the issue is resolved.

is that a regression?

@no-yan
Copy link
Copy Markdown
Collaborator Author

no-yan commented Jan 9, 2026

EDIT: The "bug" was CLI misconfiguration. I should have used -D typescipt/... or -D @typescript-eslint/..., instead of -D typescript-eslint/....


@camc314
After investigation, this bug is not a regression of the latest release or this PR.
For now, i've confirmed:

I will debug the details tomorrow and create an issue for it.

# Setup
git clone -depth=1 git@github.com:aws/aws-cdk.git

# Bad
pnpm dlx oxlint -A all -D typescript/no-floating-promises --type-aware /Users/noyan/ghq/github.com/aws/aws-cdk
# shows `typescript(tsconfig-error): Invalid tsconfig`
#       `Found 0 warnings and 13 errors. `


# Good
pnpm dlx oxlint -A all -D typescript/no-floating-promises --type-aware ~/ghq/github.com/aws/aws-cdk
# shows `Found 0 warnings and 542 errors.`

@camc314
Copy link
Copy Markdown
Contributor

camc314 commented Jan 9, 2026

perfect, if you can address this comment

#555 (comment)

this should be good to merge.

Thanks for your work on this!

@no-yan no-yan marked this pull request as ready for review January 10, 2026 08:24
@no-yan
Copy link
Copy Markdown
Collaborator Author

no-yan commented Jan 10, 2026

@camc314
Thank you for your review. I've made the corrections you pointed out.

@no-yan no-yan requested a review from camc314 January 28, 2026 15:18
@camc314
Copy link
Copy Markdown
Contributor

camc314 commented Jan 28, 2026

forgot to merge this 🫣

@camc314 camc314 enabled auto-merge (squash) January 28, 2026 15:30
Copy link
Copy Markdown
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@camc314 camc314 merged commit 36f99a9 into oxc-project:main Jan 28, 2026
7 checks passed
@jakebailey
Copy link
Copy Markdown

This is something specific to tsgolint, and not something that can be upstreamed, right?

@camc314
Copy link
Copy Markdown
Contributor

camc314 commented Jan 28, 2026

This is something specific to tsgolint, and not something that can be upstreamed, right?

yeah specific to tsgolint

@no-yan no-yan deleted the concurrent-per-file-resolution branch February 8, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parallelize TSConfig resolution per file to improve performance

3 participants