Unnecessary refresh when staying on the same label and are not supposed to refresh#2884
Open
henri-tremblay wants to merge 7 commits intospring-cloud:mainfrom
Open
Unnecessary refresh when staying on the same label and are not supposed to refresh#2884henri-tremblay wants to merge 7 commits intospring-cloud:mainfrom
henri-tremblay wants to merge 7 commits intospring-cloud:mainfrom
Conversation
Signed-off-by: Henri Tremblay <henri.tremblay@gmail.com>
Signed-off-by: Henri Tremblay <henri.tremblay@gmail.com>
…And we better use a ReentrantLock I think. At least it will prevent virtual thread pinning Signed-off-by: Henri Tremblay <henri.tremblay@gmail.com>
Signed-off-by: Henri Tremblay <henri.tremblay@gmail.com>
Signed-off-by: Henri Tremblay <henri.tremblay@gmail.com>
…abel is changing or if it's refresh time Signed-off-by: Henri Tremblay <henri.tremblay@gmail.com>
3719811 to
c76c167
Compare
Signed-off-by: Henri Tremblay <henri.tremblay@gmail.com>
c76c167 to
5d30e4b
Compare
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.
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
previousLabelrelies 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.