stable
Clone or download
Use same strategy that has been used to improve performance for commits retrieval via RESTΒ API[0]: instead of searching the user mapping the commit's author one by one, we first collect all the author emails of all git commits to display as cross references, then we lookup the users. On my environment (one artifact is linked to 400 git commit), blackfire give the following gains with this changeset: +-------------+-----------------------------------+ | Time | -379 ms (-14%) 2.75 s β 2.37 s | | I/O Wait | -150 ms (-21%) 706 ms β 556 ms | | CPU | -229 ms (-11%) 2.05 s β 1.82 s | | Peak Memory | -648 kB (-2.8%) 23.1 MB β 22.5 MB | | Network | -1.91 MB (-31%) 6.21 MB β 4.3 MB | | SQL Queries | -213 ms / -402 rq | +-------------+-----------------------------------+ Except for performances, no functional changes. Part of story #17180: take into account gitlab commits [0] git #tuleap/stable/1a7eb79d32d4fb1b2afc8eb5c8c3289440f2225b Change-Id: Ic4681175702867efbe2bc0194a676ff995c0ae09
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/git/include/Git/Reference/CommitDetails.php | +6 | β7 | Go to diff View file |
A | plugins/git/include/Git/Reference/CommitDetailsCrossReferenceInformation.php | +69 | β0 | Go to diff View file |
A | plugins/git/include/Git/Reference/CommitDetailsCrossReferenceInformationBuilder.php | +89 | β0 | Go to diff View file |
M | plugins/git/include/Git/Reference/CommitDetailsRetriever.php | +4 | β16 | Go to diff View file |
M | plugins/git/include/Git/Reference/CrossReferenceGitEnhancer.php | +6 | β4 | Go to diff View file |
M | plugins/git/include/Git/Reference/CrossReferenceGitOrganizer.php | +19 | β69 | Go to diff View file |
A | plugins/git/include/Git/Reference/OrganizeableGitCrossReferencesAndTheContributors.php | +61 | β0 | Go to diff View file |
A | plugins/git/include/Git/Reference/OrganizeableGitCrossReferencesAndTheContributorsCollector.php | +93 | β0 | Go to diff View file |
M | plugins/git/include/gitPlugin.php | +15 | β9 | Go to diff View file |
A | plugins/git/tests/unit/Git/Reference/CommitDetailsCrossReferenceInformationBuilderTest.php | +183 | β0 | Go to diff View file |
M | plugins/git/tests/unit/Git/Reference/CommitDetailsRetrieverTest.php | +2 | β2 | Go to diff View file |
M | plugins/git/tests/unit/Git/Reference/CrossReferenceGitEnhancerTest.php | +24 | β14 | Go to diff View file |
M | plugins/git/tests/unit/Git/Reference/CrossReferenceGitOrganizerTest.php | +57 | β264 | Go to diff View file |
A | plugins/git/tests/unit/Git/Reference/OrganizeableGitCrossReferencesAndTheContributorsCollectorTest.php | +265 | β0 | Go to diff View file |