[issue289] mq should create & maintain diffstats in patches

Jeremy Fitzhardinge jeremy at goop.org
Wed Jun 21 01:27:28 CDT 2006


Chris Mason wrote:
> I do like the patch, but I'm curious to see if it is measurably slower.  
> str.startswith is faster than re in general, so I'm somewhat worried about 
> this.
>   
I did some tests.  Using 2.6.17-rc6-mm2 as a patch corpus, the times I 
measured for just parsing the patches are:

    original mq: .5sec
    diffstat mq: 1.82sec
    diffstat w/ early-out: .72sec

So the regexps are pretty expensive CPU-wise, but we can gain almost all 
the performance loss back by stopping the parser once we get to the 
patch itself.

Also, this is just the time for parsing the patch headers; I would 
expect actually applying the patches would end up dominating the time taken.

    J


More information about the Mercurial mailing list