Skip to content

Speed up full index rebuilds with parallel parsing - #402

Open
Aymen (aymenfurter) wants to merge 2 commits into
mainfrom
aymenfurter-aec-indexing-performance
Open

Aymen (aymenfurter) wants to merge 2 commits into
mainfrom
aymenfurter-aec-indexing-performance

Conversation

@aymenfurter

@aymenfurter Aymen (aymenfurter) commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 5fc82d53deb499bbeb57c38fbf78dfc20df2f661

Dimension Assessment Rationale
Change confidence 9/10 ↑ The baseline and optimized parsers produced the same normalized index hash on a full history of 11,452 sessions.
↑ The packaged extension used all 11 shards in VS Code without falling back to the coordinator.
↑ The repository check passed after the final changelog update.
↓ Full-history timings and output comparisons cover one Mac and one fixed snapshot.

Description

A full rebuild made users wait more than two minutes before they could use the dashboard on a large session history. This change parses workspace folders and external sources in parallel. Each child process records its changes; the coordinator applies them in the original serial order. The parser also avoids repeated work in edit replay, CLI event decoding, and question detection. It does not reuse an existing index for a full rebuild. Set AEC_PARSE_SHARDS=0 to use the serial path.

On one Mac, with the same real history and an empty index cache before each run:

VS Code 1.125.0 main (7877280) This change Speedup
Full index rebuild 141.40 s 12.97 s 10.9x
Dashboard data ready 145.30 s 16.95 s 8.6x

A separate standalone comparison on that snapshot returned the same SHA-256 hash for both builds across sessions (including requests), workspaces, edit counts, and session-source mappings. The check kept session order and normalized map and set order. Both builds returned 11,452 sessions and 51,519 requests. This is a comparison of index data, not a byte-for-byte comparison of the saved cache against main.

Validation

  • npm run check passed: 4,254 tests passed and 4 were skipped.
  • npm run test:vscode passed. The separate real-data extension-host run used 11 shards with no in-process fallback.
  • npm run package and npm run check-size passed.
  • E2E_PORT=43212 npm run test:e2e: 257 passed, 7 skipped, 1 failed. The same Curiosity page layout assertion at 760 x 900 also failed on the base revision.

Related Issues

N/A.

Checklist

  • npm run check passes (typecheck + lint + spellcheck + knip + tests)
  • Changes are covered by tests (if applicable)
  • Documentation updated (if applicable)
  • User-visible changes are described in a changelog.d/<PR number>.md fragment

Distribute cold parsing across processes and apply results in serial order. Reduce repeated work in edit replay, CLI event decoding, and question detection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bf81c47d-e9db-45ea-94b7-4c302c92f8fd
@github-actions

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bf81c47d-e9db-45ea-94b7-4c302c92f8fd
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.

1 participant