Commit Graph

12 Commits

Author SHA1 Message Date
Pieter de Bie ddc9ae7654 PBGitCommit: Don't store refs
We already keep this dictionary in our repository. Rather than adding a
pointer to it on every commit in our rev walk, just look it up lazily in the
dictionary when we need to. That cuts down some time in the initial revwalk
and also removes some stupid code :)
2009-01-25 02:14:09 +00:00
Pieter de Bie 641d2dbdce GitGrapher: Reduce number of lines we output
We used to output a line for every lane after the
lane in which the current commit is in, and also
make it have the wrong color. This fixes the buglet
and also makes sure not to draw a line when
the commit has no parents.
2008-12-22 20:11:57 +01:00
Pieter de Bie 56a6adc234 GitGrapher: Do not crash on only a single commit
This was somewhat unfortunate, as we don't check
on if we have at least a single parent when adding
new parents. That would cause a wild pointer, or null
dereference when creating a new lane.
2008-12-15 17:33:50 +01:00
Pieter de Bie 777f70f24f Remove leftover comment 2008-11-25 18:12:26 +01:00
Pieter de Bie 4e915cc68f Remove "extern C" declaration when importing libgit2
libgit2 takes care of thiss now, so we don't have to.
2008-11-25 17:43:11 +01:00
Pieter de Bie b4c2a4f3fa GitGrapher: free pointers on dealloc
This frees the std vector and its contents on
dealloc. We also fresh up the header a bit
2008-11-25 17:43:10 +01:00
Pieter de Bie e0dcdf62b3 PBGitGrapher: Use std::list rather than vector
This allows us to remove the currentlane if
necessary, fixing a drawing bug
2008-11-24 22:54:05 +01:00
Pieter de Bie 8372aee404 PBGitCommit: Use git_oids for parent shas
This uses a normal c array to store parent sha's. That means that we
save a lot of room, as they are only 20 bytes rather than 40 + the cost of
an NSArray and the NSStrings.
2008-11-24 22:54:04 +01:00
Pieter de Bie e570c3e50a Use structs for graph lines
We used to use NSObjects, which was really expensive, because for each commit
as many as 100 graphlines can be created. By preallocating them and not
using NSObjects in general, we gain a massive speedup
2008-11-24 22:54:04 +01:00
Pieter de Bie 6aa28941e1 GitGrapher: Remove unneedded loop
I'm not sure what this loop originally did, but it was buggy and doesn't
seem logical. Removing it speeds up the graphing a lot, so let's kill it.
We can always get it back later if necessary
2008-11-24 22:54:04 +01:00
Pieter de Bie d2eafc2d52 Include libgit2 as submodule and use it to store sha's
This reduces GitX's memory usage and makes some operations much faster,
like graphing, by having a cheaper comparison
2008-11-24 22:53:48 +01:00
Pieter de Bie cef35ac7ce GitGrapher: Rewrite looping code to C++
This makes the revwalking faster by not creating as many NSObjects as before.
2008-11-24 22:32:42 +01:00