git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Robin Rosenberg
Message 6 of 6 in “Simplify and micro-optimize WorkingTreeIterator.ENTRY_CMP”
  1. 1/4 Simplify and micro-optimize WorkingTreeIterator.ENTRY_CMPShawn O. Pearce, Aug 21, 2008
  2. 2/4 Support post order tree handling during TreeWalkShawn O. Pearce, Aug 21, 2008
  3. 3/4 Micro-optimize TreeWalk's exitSubtree implementationShawn O. Pearce, Aug 21, 2008
  4. 4/4 Add getNameString to TreeWalk to get only the last path componentShawn O. Pearce, Aug 21, 2008
  5. Robin RosenbergAug 22, 2008
  6. Shawn O. PearceAug 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.