Skip to content

perf: speed up headless file-to-program assignment - #1239

Merged
graphite-app[bot] merged 1 commit into
mainfrom
perf/headless-file-program-assignment
Sep 23, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
perf/headless-file-program-assignment

Conversation

@camc314

@camc314 camc314 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Resolve the nearest config once for files in the same directory, then use TypeScript's indexed file-name map for membership checks.
  • Search project references and ancestor configs only when the nearest config does not include a file. Dispatch those misses in batches so a large directory still uses multiple workers. Add regression coverage for mixed-case paths and files in one directory that belong to different configs.

Performance

Median Assignment Time

Repo Before After Speedup
elastic/kibana (62fca130) (M2 Max) 3.06 s 0.732 s 4.2x
Internal Repo (~24k files) (M4 Pro) 2.14 s 0.32 s 6.6×

Allocated Memory

Repo Before After Change
elastic/kibana (62fca130) (M2 Max) 614 MB/op 372 MB/op 39% less

Copilot AI lite review requested due to automatic review settings September 23, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T20:15:48.769393Z c989e5f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d13a693cb9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/utils/find_tsconfig.go Resolved
@camc314 camc314 self-assigned this Sep 23, 2026

camc314 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

## Summary

- Resolve the nearest config once for files in the same directory, then use TypeScript's indexed file-name map for membership checks.
- Search project references and ancestor configs only when the nearest config does not include a file. Dispatch those misses in batches so a large directory still uses multiple workers. Add regression coverage for mixed-case paths and files in one directory that belong to different configs.

## Performance

Median Assignment Time

| Repo | Before | After | Speedup |
| --- | ---: | ---: |---: |
| elastic/kibana (62fca130) (M2 Max)| 3.06 s | 0.732 s | 4.2x |
| Internal Repo (~24k files) (M4 Pro)| 2.14 s|  0.32 s| 6.6× |

Allocated Memory

| Repo | Before | After | Change |
| --- | ---: | ---: |---: |
| elastic/kibana (62fca130) (M2 Max) | 614 MB/op | 372 MB/op | 39% less|
@graphite-app
graphite-app Bot force-pushed the perf/headless-file-program-assignment branch from c989e5f to 364b239 Compare September 23, 2026 21:07
@graphite-app
graphite-app Bot merged commit 364b239 into main Sep 23, 2026
9 checks passed
@graphite-app graphite-app Bot removed the 0-merge label Sep 23, 2026
@graphite-app
graphite-app Bot deleted the perf/headless-file-program-assignment branch September 23, 2026 21:15
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.

2 participants