Currently git and mercurial detect copies when viewing commits. This adds a significant amount of time to each request and is not a common enough occurrence to justify such a large performance hit on every view.
But we should also probably add an option in the .ini that gives the option to enable copy detection (noting the performance penalty).
QA at:
allura hs/7963
forgehg hs/7963
Do we need to skip renames for git? Renames aren't as rare as copies, so it'd be nice if we only skipped copies. What's the performance breakdown for it?
forgegit.tests.functional.test_controllers:TestGitRename.test_commit
failsRepo commit items: 578
paged_diffs no rename/copy- elapsed time: 0.018 seconds
paged_diffs with detect rename - elapsed time : 0.689 seconds
paged_diffs - with detect copy (assumes rename) elapsed time: 0.816 seconds
I fixed the test but since it has to do with renames, I'll wait until we decide which way we want to go...
Separate options for git & hg probably are best here, so people have more control over it. One for hg copies since that's definitely the slowest. And one for git that covers both copies and renames since they are pretty close in times.
I would suggest a default of hg copies: false, git copy/rename: true. Since the git copy/rename is still fairly fast and renames are useful to show.
I agree. I made those changes and updated the tests.
Force-pushed changes to:
allura hs/7963
forgehg hs/7963
Looks good, I made one small change to default
scm.commit.git.detect_copies
toTrue
in the code if no config is specified (e.g. upgrade with existing .ini file)