Re: [JGIT PATCH 1/4] Simplify and micro-optimize WorkingTreeIterator.ENTRY_CMP
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Aug 22, 2008, 23:07 UTC
- Message-ID
- <20080822230705.GO3483@spearce.org>
- In-Reply-To
- <200808222245.08814.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
Show 7 quoted lines
> torsdagen den 21 augusti 2008 22.57.35 skrev Shawn O. Pearce: > > We already did this simplification work to AbstractTreeIterator's > > pathCompare method, and this is based upon that same structure. > > I noticed we have very bad code coverage in unit tests in this area of the code. > Maybe we should increase the coverage before optimizing. I'll accept the patches > anyway and pray they are ok.
Yea, I didn't go into here just to optimize the code. But I looked at it and said "WTF was I smoking when I wrote that? Must have been some good quality stuff!".
I was in there studying the method because I wanted to call it from someplace else, and then realized how crappy it was. So as I simplified it, I noticed we didn't have to do as many compares to come up with the same result.
I'm working on improving test coverage. Slowly. But I am trying to spend at least a few hours a week on it. I know we are really, really bad here. It will get better.
-- Shawn.