Performance issues when merging branches (1000+ files being merged takes 75~ seconds)

Vishakh Harikumar vsh426 at gmail.com
Thu Jun 17 15:22:56 CDT 2010


On Thu, Jun 17, 2010 at 9:08 PM, Peter Arrenbrecht <
peter.arrenbrecht at gmail.com> wrote:

>
> OK, key issue is that filectx.ancestor always recomputes the cset
> ancestor. This is unnecessary. Shall look into fixing this later.
> -parren
>

Since the same ctx are used everytime, caching it
results in time:
real    0m10.231s
user    0m5.650s
sys     0m1.480s

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -173,6 +173,7 @@
         return filectx(self._repo, path, fileid=fileid,
                        changectx=self, filelog=filelog)

+    @util.lrucachefunc
     def ancestor(self, c2):
         """
         return the ancestor context of self and c2

I dont know if the change affects anything else.

-- 
vsh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100618/7c4a9165/attachment.htm>


More information about the Mercurial-devel mailing list