[darcs-users] add/record time

David Roundy droundy at jdj5.mit.edu
Mon Jul 28 10:48:08 UTC 2003


On Sun, Jul 27, 2003 at 07:29:47PM -0700, Trevor Talbot wrote:
> On Sunday, Jul 27, 2003, at 17:43 US/Pacific, David Roundy wrote:
> 
> >There may be more than one slowdown.  I've found an O(n^2) function in 
> >pull, which is the part where it checks for conflicts in the merge, 
> >which is currently an O(n^2) process (but needn't be, except when 
> >there are lots of conflicts--and then it would be O(nm) where m is # 
> >of conflicts and n is number of patches).
> >
> >However, I think this would show up only after it has produced more 
> >output than you got.  Still, once I get rid of this problem (a job for 
> >tomorrow--will take some thought to get right), perhaps I will be able 
> >to see (using the profiler again) what is causing your slowdown.
> 
> Ok.  Incidentally, this is a bit ridiculous for a normal usage case: I 
> won't actually be adding 7000 files every few days ;)  I can also work 
> around this quite easily, as I don't need the individual patches, just 
> the sum of the changes.  darcs diff and classic patch can accomplish 
> that, and I'd just resume work in a new repository.

True, but usually the largest patches come when people are first setting up
their repositories, and it would be nice for their first experience with
darcs to not be waiting for 12 hours with it churning along and giving no
output.  :)

> But I figured since it came up, it would be a good time to address it.

Absolutely.  Scaling issues are important.  In my test case (which is
smaller than yours, so I won't have to wait as long, and thus closer to the
usual situation), the resolution fix (which is now available) sped up my
test pull from 2m30s to 1m40s, which is quite a nice improvement!

I'd like to hear if you still have problems after this patch, since it
looks from the profiler like there are no slupid slowdowns remaining... all
the time seems to be spent where it ought to be.  If you still have trouble
I may need to test with a larger patch, as there may be an O(n^2) bit of
code with a tiny prefactor that I can't see with my moderate-sized patch.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list