Improving performance for Trac's git support
Using python bindings for git rather than the git command-line
This could be an alternative backend that would avoid the cost of spawning git executables and parsing their standard output.
The trade-offs could be the following, bindings vs. command-line:
- (+) faster (but how much?)
- (?) robustness
- (+) no pipe handling and dangling processes (is this still problematic?)
- (-) crashes?
- (-) memory usage (risk of memory leaks?)
Peter Stuge started a conversion of the backend, see his early work in his pygit2wip branch.
Installation
First you'll need to install the git bindings for Python:
And for building libgit2
, you'll need cmake.
Windows build instructions, for Python 2.6 or 2.7 with VC9
Follow the instructions given in this section: https://github.com/libgit2/pygit2#building-on-windows
At this point you're ready to build the bindings themselves:
$ git clone https://github.com/libgit2/pygit2 $ cd pygit2 $ ls $LIBGIT2 bin include lib $ python setup.py install
Attachments (2)
-
libgit2-msvc9.diff
(1.3 KB
) - added by 12 years ago.
patch for libgit2, needed when building with msvc9 so that pygit2 can link to it (see #741)
-
pygit2-msvc9.diff
(1.7 KB
) - added by 12 years ago.
patch for pygit2, needed to build with msvc9 (see #60)
Download all attachments as: .zip