Community
Participate
Working Groups
I sometimes see test failures in GitLogTest where the cause is "operation took too long". I noticed when running this that is typically takes 10-12 seconds to execute the log command in this test on my machine. I ran the test in the profiler, and found almost all the time is in Commit.getTags(). This operation walks over every tag in the repository and compares commit id to the one we are processing. In a Git Log operation, we do this for 50 commits at at time, which means walking the entire tag list 50 times. We could just walk the repository once and hold onto the result. This is what we do for branches.. see Commit.get/setCommitToBranchMap and how it is used in Log.getChildren().
Marking as a candidate for 3.0. I might have time to get to this, but if not it's a good simple bug for someone getting started.
Created attachment 230459 [details] Profile output shows the nature of the problem
https://orion.eclipse.org/git/reviewRequest.html#https://github.com/gabrielluong/orion.server.git_89eb7fb6b41c05b7d21435441e8fb40350e5ada6 Added check for when commitToTagMap does not contain the commit id https://orion.eclipse.org/git/reviewRequest.html#https://github.com/gabrielluong/orion.server.git_99edb06d92c0f7c7010cd7c114f8cde61bfe107c I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL
Added my github commit just in case the process is a bit different for orion.server Added a commitToTagMap similar to commitToBranchMap, which only fetches the map once and is set to every commit. Perhaps it should only pass in the tags relevant to the commit (getCommitToTagMap().get(revCommit.getId()) instead of passing the entire map? https://github.com/gabrielluong/orion.server/commit/89eb7fb6b41c05b7d21435441e8fb40350e5ada6 Added a check for npe when the revCommit id is not in the map. https://github.com/gabrielluong/orion.server/commit/99edb06d92c0f7c7010cd7c114f8cde61bfe107c
Szymon can you review this, I'm completely swamped.
Review bump
Review bump!
Looks good, tests pass, merged.