Re: [BAD PATCH 0/9] v4-aware tree walker API
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Oct 11, 2013, 13:05 UTC
- Message-ID
- <20131011130528.GA10014@lanh>
- In-Reply-To
- <20131011122259.GA7776@lanh>
On Fri, Oct 11, 2013 at 07:22:59PM +0700, Duy Nguyen wrote:
Show 5 quoted lines
> > > Maybe we could make an exception and allow the tree walker to pass > > > pv4_tree_cache* directly to decode_entries so it does not need to do > > > the first lookup every time.. > > > > > > Suggestions?
Looking at decode_entries() traces I think the "one decode_entries() for one tree_entry()" just amplifies the delta chain effect. If you hide 3 entries behind 5 layers of copy sequences (i.e. tree1->tree2->..->tree5->real-tree-entry), then every decode_entries(count=1) will have to go through 5 layers.
It makes me wonder if we should cache shortcuts so that after the first going through 5 layers, the second can jump directly to the tree entries.
> > > > I'll try to have a look at your patches in more details soon. > > Shameful fixup (though it does not seem to impact the timing)
And here's another one
-- 8< --
diff --git a/list-objects.c b/list-objects.c index 39ad3e6..85dc14e 100644 --- a/list-objects.c +++ b/list-objects.c @@ -82,8 +82,10 @@ static void process_tree(struct rev_info *revs, die("bad tree object"); if (obj->flags & (UNINTERESTING | SEEN)) return; +#if 0 if (parse_tree(tree) < 0) die("bad tree object %s", sha1_to_hex(obj->sha1)); +#endif obj->flags |= SEEN; show(obj, path, name, cb_data); me.up = path;