Skip to content

Conversation

henri-tremblay
Copy link

@henri-tremblay henri-tremblay commented Jun 6, 2025

We noticed that each access could take about 1 second on a really huge repository (20,000 commits) with one branch.

This was tracked down to JGitEnvironmentRepository that would do a checkout and merge even if the requested label is always the same and we are inside the refresh rate so no pull occured.

The PR skips the checkout and merge when no pull is done and the same label is requested because we know the repo is already at the right place.

I also did 2-3 improvements to the code.

The content of previousLabel relies on the correct synchronization from the outside. Moving it to volatile would remove this requirement. That said, if #2656 is merged, it will remove that need I think.

I added myself as an author in the files I'm changed a lot. Feel free to remove me if the change is not substantial enough. I was only trying to follow the contributing guidelines.

Signed-off-by: Henri Tremblay <[email protected]>
…And we better use a ReentrantLock I think. At least it will prevent virtual thread pinning

Signed-off-by: Henri Tremblay <[email protected]>
Signed-off-by: Henri Tremblay <[email protected]>
…abel is changing or if it's refresh time

Signed-off-by: Henri Tremblay <[email protected]>
Signed-off-by: Henri Tremblay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants