#7963 Speed up commit view by disabling copy detection by default -- NEEDS INI

v1.3.2
closed
SCM
2015-08-24
2015-08-13
No

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).

[#7925]

Related

Tickets: #7925

Discussion

  • Heith Seewald

    Heith Seewald - 2015-08-18
    • assigned_to: Heith Seewald
     
  • Heith Seewald

    Heith Seewald - 2015-08-18
    • summary: Speed up commit view by disabling copy detection by default --> Speed up commit view by disabling copy detection by default -- NEEDS INI
    • status: open --> review
     
  • Heith Seewald

    Heith Seewald - 2015-08-18

    QA at:
    allura hs/7963
    forgehg hs/7963

     
  • Dave Brondsema

    Dave Brondsema - 2015-08-19
    • labels: performance --> performance, sf-current, sf-2
     
  • Dave Brondsema

    Dave Brondsema - 2015-08-19

    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 fails

     
  • Heith Seewald

    Heith Seewald - 2015-08-19

    Repo 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...

     
  • Dave Brondsema

    Dave Brondsema - 2015-08-20

    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.

     
  • Heith Seewald

    Heith Seewald - 2015-08-20

    I agree. I made those changes and updated the tests.

    Force-pushed changes to:
    allura hs/7963
    forgehg hs/7963

     
  • Dave Brondsema

    Dave Brondsema - 2015-08-20
    • status: review --> closed
    • Reviewer: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2015-08-20

    Looks good, I made one small change to default scm.commit.git.detect_copies to True in the code if no config is specified (e.g. upgrade with existing .ini file)

     
  • Dave Brondsema

    Dave Brondsema - 2015-08-24
    • labels: performance, sf-current, sf-2 --> performance, sf-2
     
  • Dave Brondsema

    Dave Brondsema - 2015-12-08
    • Milestone: unreleased --> v1.3.2
     

Log in to post a comment.