Skip to content

Skip repo info diff when commit count exceeds limit#4309

Draft
tyrielv wants to merge 1 commit intomicrosoft:mainfrom
tyrielv:tyrielv/propose-log-count-limit-for-diff
Draft

Skip repo info diff when commit count exceeds limit#4309
tyrielv wants to merge 1 commit intomicrosoft:mainfrom
tyrielv:tyrielv/propose-log-count-limit-for-diff

Conversation

@tyrielv
Copy link

@tyrielv tyrielv commented Mar 9, 2026

Add MAX_DIFF_COMMITS (30) check using repository.log() with a range of mergeBase..HEAD. If the number of commits returned hits the limit, return early with a 'tooManyCommits' result to avoid expensive diff operations on branches with large commit ranges.

Add optional commitCount measurement to telemetry, populated only when the commit count is within the limit.

Add MAX_DIFF_COMMITS (30) check using repository.log() with a range of
mergeBase..HEAD. If the number of commits returned hits the limit, return
early with a 'tooManyCommits' result to avoid expensive diff operations
on branches with large commit ranges.

Add optional commitCount measurement to telemetry, populated only when
the commit count is within the limit.
@tyrielv
Copy link
Author

tyrielv commented Mar 9, 2026

This is one proposal for fixing the performance issues that VFS users in large repositories are seeing with this extension. I have another at #4308.

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