Perf: Bound file coupling pair generation - #60
Merged
Merged
Conversation
Added - File coupling aggregator options with a configurable max-files-per-commit threshold for bounded pair generation - Regression coverage for skipping oversized commit bundles while preserving small bundle correctness Changed - File coupling aggregation now pre-reserves semantic writer capacity for expected pair counts in normal bundles - File coupling generation now skips oversized commit bundles once they exceed the configured threshold instead of paying unbounded quadratic cost Result File coupling generation now preserves full pair correctness for small and normal commits while explicitly bounding CPU cost for large bundles. At 10000 commits, the 4-file case improved from 263.33 us to 260.49 us, the 12-file case improved from 5.44 ms to 4.94 ms, and the 32-file case is now bounded by the large-commit threshold instead of generating full pair output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bound file coupling pair generation cost for large commit bundles while preserving full pair generation for small and normal commits.
Added
Changed
Fixed
Result
File coupling generation now preserves full pair correctness for small and normal commits while explicitly bounding large-commit behavior.
At the benchmark baseline points:
1000commits,4files/commit:25.81 us->25.65 us1000commits,12files/commit:289.69 us->297.35 us1000commits,32files/commit:2.56 ms->1.59 us10000commits,4files/commit:263.33 us->260.49 us10000commits,12files/commit:5.44 ms->4.94 ms10000commits,32files/commit:35.77 ms->23.77 usTesting
dotnet test Tests/ChangeTrace.Tests.csproj --filter "FullyQualifiedName~FileCouplingAggregatorTests"dotnet run -c Release --project Benchmarks/ChangeTrace.Benchmarks.csproj -- --filter "*FileCouplingAggregatorBenchmarks*"Additional notes:
Linked Issues
Checklist