Hello,

I was wondering if any progress had been made on this. I found this page:
http://trac.edgewall.org/wiki/TracDev/Performance/Git
and was playing around with Peter Stuge's branch, but that seems to be
in a incomplete state.

After playing around with the code a while I realize that the main
issue is that we're having to reprocess a large number of changes over
and over. It also seems like the revision cache gets invalidated and
reset quite a bit (way more than I'd expect especially since I've got
the system hooked up to a trac repository that nobody can write to
(local copy of our production repository).

I'm not sure how my repo compares in size to others (23k commits with
6k branches/tags) but it takes PyGIT about 3 minutes (200k
milliseconds) to run get_rev_cache when a rebuild is triggered.

Another thought I had is about the way the source browser behaves. It
tries to show the whole source tree with the latest changes on each
file from all the branches and tags in the repo... but I think it
would be better to just have it default to showing whatever branch is
pointed to by origin/HEAD and then let people select particular
branches if they way... or at least a workflow like this would work
better for me. I'm not sure if this would help solve the existing
problem with speed since we'd still need to traverse a large portion
of the commits in the repo (my master branch contains 18k of the 23k
commits in the repository).

I was also playing around with pygit2 and played around with improving
the speed of this call:
            revs = set(self.git.all_revs())


by replacing it with:
repo = pygit2.Repository("server.git")
head = repo.head
all_refs = repo.listall_references()
walker = repo.walk(head.oid, pygit2.GIT_SORT_TIME)
for ref in all_refs:
    print "REF: %s" % ref
    if ref.startswith("refs"):
        _ref = repo.lookup_reference(ref)
        commit = repo[_ref.oid]
        if commit.type == 4:
            commit = repo[commit.target]
        print commit
        walker.push(commit.oid)
revs = set( x.hex for x in walker )

But ended up running into some problems with sync... but benchmarking
just this portion:
PyGIT: 22985 commits real 2m54.628s
pygit2: 22985 commits real 0m1.690s

Still trying to figure out what approach to take to try and resolve this issue.

Thanks in advance,

Ben

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to