Skip to content

⚡ Parallelize drift analysis and optimize file discovery - #6

Merged
SireJeff merged 3 commits into
mainfrom
performance-parallel-drift-analysis-7705854736231554152
Feb 19, 2026
Merged

SireJeff merged 3 commits into
mainfrom
performance-parallel-drift-analysis-7705854736231554152

Conversation

@SireJeff

Copy link
Copy Markdown
Owner

💡 What:
Implemented parallel processing for documentation drift analysis in the DriftAgent and optimized file discovery using multi-pattern globbing.

🎯 Why:
The previous implementation performed AI analysis calls sequentially, which was a major performance bottleneck, especially when checking many files. Additionally, file discovery performed multiple sequential glob calls which added unnecessary overhead.

📊 Measured Improvement:
By parallelizing the analysis with a concurrency limit of 5, the time taken for drift detection should theoretically decrease by up to 80% for large file sets (assuming AI latency is the dominant factor). File discovery is also more efficient by using glob's native support for pattern arrays.
Note: A live benchmark was attempted but could not be completed due to the absence of node_modules and internet access in the current environment.


PR created automatically by Jules for task 7705854736231554152 started by @SireJeff

- Parallelize `detectDrift` file analysis with a concurrency limit of 5.
- Optimize `discoverSourceFiles` and `getContextFiles` to use `glob` with pattern arrays.
- Improve overall agent performance and efficiency for documentation drift detection.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

SireJeff and others added 2 commits February 18, 2026 22:05
- Parallelize `detectDrift` file analysis with a concurrency limit of 5.
- Optimize `discoverSourceFiles` and `getContextFiles` to use multi-pattern globbing.
- Move `sqlite-vec-windows-x64` to `optionalDependencies` to fix CI failures on Linux.
- Update `package-lock.json` to ensure consistency for `npm ci`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Parallelize `detectDrift` file analysis with a concurrency limit of 5.
- Optimize file discovery with multi-pattern globbing.
- Fix CI failure by moving `sqlite-vec-windows-x64` to `optionalDependencies`.
- Fix 18 lint errors across multiple files (prefer-const, no-useless-escape, no-var-requires, no-case-declarations).
- Clean up unused import in `drift-agent.ts`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@SireJeff
SireJeff merged commit 5ff8b73 into main Feb 19, 2026
3 checks passed
@SireJeff
SireJeff deleted the performance-parallel-drift-analysis-7705854736231554152 branch February 19, 2026 16:13
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