[PATCH 4 of 4 more-matchers] manifestmerge: have manifest do matching before diffing

Matt Mackall mpm at selenic.com
Tue Dec 15 16:36:11 CST 2015


On Tue, 2015-12-15 at 12:56 -0500, Augie Fackler wrote:
> On Tue, Dec 15, 2015 at 12:15 AM, Martin von Zweigbergk
> <martinvonz at google.com> wrote:
> > 
> > 
> > On Mon, Dec 14, 2015 at 7:20 PM Augie Fackler <raf at durin42.com>
> > wrote:
> > > 
> > > # HG changeset patch
> > > # User Augie Fackler <augie at google.com>
> > > # Date 1450144641 18000
> > > #      Mon Dec 14 20:57:21 2015 -0500
> > > # Node ID 7048ea9ba5b92e4f582524463a6167039fa44eeb
> > > # Parent  5eee49ed60caa99be140f7f80ac7fb07f1c0324d
> > > manifestmerge: have manifest do matching before diffing
> > > 
> > > This means that the diff code does less work, potentially
> > > significantly less in the case of treemanifests. It also should
> > > help
> > > with narrowed clone cases (such as narrowhg) when we don't always
> > > have
> > > the entire set of treemanifest revlogs locally.
> > 
> > 
> > Looks good to me. I'd simplify that definition of "partial" in
> > flight and
> > queue if only the clowncopter had been up. And perhaps it
> > appropriate for
> > someone not from the same company looks at it too.
> 
> Per an irc conversation I've added some mozilla-central timing
> information and pushed these to the clowncopter. Thanks!

This timing info is mystifying:

-----
Before this refactoring:                                                                                                                                                                                                                       
                                                                                                                                                                                                                                               
augie% python ~/Programming/hg/crew/contrib/hgperf diff -c tip --stat                                                                                                                                                                          
! wall 0.547483 comb 0.550000 user 0.520000 sys 0.030000 (best of 18)                                                                                                                                                                          
augie% python ~/Programming/hg/crew/contrib/hgperf diff -c tip --stat xpcom                                                                                                                                                                    
! wall 0.179505 comb 0.180000 user 0.180000 sys 0.000000 (best of 47)                                                                                                                                                                          
                                                                                                                                                                                                                                               
After this refactoring:                                                                                                                                                                                                                        
                                                                                                                                                                                                                                               
augie% python ~/Programming/hg/crew/contrib/hgperf diff -c tip --stat                                                                                                                                                                          
! wall 0.467176 comb 0.460000 user 0.450000 sys 0.010000 (best of 20)                                                                                                                                                                          
augie% python ~/Programming/hg/crew/contrib/hgperf diff -c tip --stat xpcom                                                                                                                                                                    
! wall 0.208571 comb 0.200000 user 0.200000 sys 0.000000 (best of 45)                                                                                                                                                                          
-----     

So we're benchmarking the diff command... but the diff command never
touches merge.py. I stuck a 'print "yo"' right before the first line
touched by the diff to confirm that diffs are still not merges and was
pleased to see I'm not losing my mind.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list