Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-14467

git rev-list --count called every time making it unnecessarily slow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.4.19
    • 3.4.18
    • ChangeSetViewManager
    • None
    • Severity 3 - Minor

      When sourcetree does "Fetching commits" it counts the number of commits for every iteration - however the number of commits does not change between iterations.
      It suffices to call it once to get the call.

      Here's an extract of the log:

      ```
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks log --skip=25600 --max-count=200 --branches=my-branch --full-history --date-order \"--format=%H\u001e%h\u001e%P\u001e%ai\u001e%cn <%ce>\u001e%an <%ae>\u001e%d\u001e%s\" --decorate=full --date=iso HEAD --",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00.2599985",     "CallerContext": "LogRevisions",     "Output": "redacted"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks rev-list --after 06.07.2024 HEAD --count",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00",     "CallerContext": "GetCommitCountSinceCommit",     "Output": "0\n"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks log --skip=25800 --max-count=200 --branches=my-branch --full-history --date-order \"--format=%H\u001e%h\u001e%P\u001e%ai\u001e%cn <%ce>\u001e%an <%ae>\u001e%d\u001e%s\" --decorate=full --date=iso HEAD --",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00.4840041",     "CallerContext": "LogRevisions",     "Output": "redacted"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks rev-list --after 06.07.2024 HEAD --count",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00",     "CallerContext": "GetCommitCountSinceCommit",     "Output": "0\n"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks log --skip=26000 --max-count=200 --branches=my-branch --full-history --date-order \"--format=%H\u001e%h\u001e%P\u001e%ai\u001e%cn <%ce>\u001e%an <%ae>\u001e%d\u001e%s\" --decorate=full --date=iso HEAD --",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00.2590017",     "CallerContext": "LogRevisions",     "Output": "redacted"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks rev-list --after 06.07.2024 HEAD --count",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00",     "CallerContext": "GetCommitCountSinceCommit",     "Output": "0\n"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks log --skip=26200 --max-count=200 --branches=my-branch --full-history --date-order \"--format=%H\u001e%h\u001e%P\u001e%ai\u001e%cn <%ce>\u001e%an <%ae>\u001e%d\u001e%s\" --decorate=full --date=iso HEAD --",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00.2010001",     "CallerContext": "LogRevisions",     "Output": "redacted"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks rev-list --after 06.07.2024 HEAD --count",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00",     "CallerContext": "GetCommitCountSinceCommit",     "Output": "0\n"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks log --skip=26400 --max-count=200 --branches=my-branch --full-history --date-order \"--format=%H\u001e%h\u001e%P\u001e%ai\u001e%cn <%ce>\u001e%an <%ae>\u001e%d\u001e%s\" --decorate=full --date=iso HEAD --",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00.3830012",     "CallerContext": "LogRevisions",     "Output": "redacted"   }

      ,
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks rev-list --after 06.07.2024 HEAD --count",     "Directory": "C:\\some\\path",     "Status": "Finished",     "Duration": "00:00:00",     "CallerContext": "GetCommitCountSinceCommit",     "Output": "0\n"   }

      ,
      ```

            698877135425 Mukesh Kumar
            472a758444e5 bablex
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: