gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] [PATCH] arch speedups on big trees


From: Chris Mason
Subject: Re: [Gnu-arch-users] [PATCH] arch speedups on big trees
Date: Fri, 19 Dec 2003 16:41:05 -0500

On Fri, 2003-12-19 at 16:30, Andrew Suffield wrote:

> > Gotcha, that is a problem.  It seems we should be able to detect most
> > variations on this though (patching/deleting a file that doesn't exist,
> > etc), and just trigger a full inventory.
> 
> Actually, that suggests a variation that makes more sense:
> 
> When we're trying to modify or delete the file with id X, we don't
> really want to know the path of every file in the tree - just the one
> with id X. So, start by asking "Does the file at path foo have id X?",
> and if it does, stop. If it doesn't, scan outwards until we find it
> (simplified form: scan the whole tree).
> 
Exactly.

> That'll require a bit of refactoring of the inventory interface, I
> think, but shouldn't be too hard. It should work for any changeset
> application.
> 
> Adding a file is the exceptional case - we have to scan the whole tree
> for that. But it doesn't happen very often in general, so that's
> probably a reasonable cutoff point for the optimisation.

Unfortunately for me, the patches I work with do add files frequently. 
But things only break down if we're trying to prevent the addition of
files with duplicate ids in different locations during a merge.  Does
the current code prevent that?

-chris






reply via email to

[Prev in Thread] Current Thread [Next in Thread]