author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 8 Nov 2006 00:58:37 +0000 (19:58 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 8 Nov 2006 04:48:20 +0000 (23:48 -0500) | ||
commit | 6b29267542546b443fd885b2ed6dc896680b09ed | |
tree | 4ecc24680a2e414be8b858d9b9d236490075fd68 | tree | snapshot |
parent | 93f654df7ec9a509e9362e06821c2af0b2bacc82 | commit | diff |
git-gui: More performance improvements to rescan logic.
Removed as much as possible from the merge_state proc, which is where
we spent most of our time before UI update. This change makes our
running time match that of git status, except that we then need about
7 additional seconds to draw 6900 files on screen.
Apparently the [array names a -exact $v] operator in Tcl is O(n) rather
than O(1), which is really quite disappointing given that each array can
only have one entry for a given value. Switching to a lookup with a
catch (whose error we ignore) runs in O(1) time and bought us most of
that improvement.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Removed as much as possible from the merge_state proc, which is where
we spent most of our time before UI update. This change makes our
running time match that of git status, except that we then need about
7 additional seconds to draw 6900 files on screen.
Apparently the [array names a -exact $v] operator in Tcl is O(n) rather
than O(1), which is really quite disappointing given that each array can
only have one entry for a given value. Switching to a lookup with a
catch (whose error we ignore) runs in O(1) time and bought us most of
that improvement.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | diff | blob | history |