Comment 1 for bug 535118

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: dulwich slow in places (revision_history)

Comparing commits just compares their hashes so this shouldn't be a problem - it's not significantly less efficient than working with those hashes as strings directly. We eventually retrieve the full contents of the commit anyway to be able see what its parents and commit timestamp are.

Commits are only retrieved once for each sha anyway, so I don't see the point of caching them.

history is a list intentionally, so it can be sorted. Optionally we could keep a set of sha's that have already been processed so that we don't have to iterate the lsit each time.

Another optimization I see is using binary search to find the right place to insert a commit sha.