D5782: changegroup: don't try to prune manifest nodes if not ellipses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

D5782: changegroup: don't try to prune manifest nodes if not ellipses

pulkit (Pulkit Goyal)
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  In non-ellipses case, the number of manifest nodes can be very big, and finding
  whether one of them can be pruned or not is very costly. For each node, we try
  to find the rev and the linkrev, which is expensive.
 
  Sending bit more manifest nodes seems better and much faster here. On our
  internal repository, this saves around 5 seconds on `hg tracked --addinclude
  <some_path>` on a narrow repo with ellipses disabled.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5782

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -1073,6 +1073,11 @@
                 # because of narrow clones). Do this even for the root
                 # directory (tree=='')
                 prunednodes = []
+            elif not self._ellipses:
+                # In non-ellipses case and large repositories, it is better to
+                # prevent calling of store.rev and store.linkrev on a lot of
+                # nodes as compared to sending some extra data
+                prunednodes = nodes.copy()
             else:
                 # Avoid sending any manifest nodes we can prove the
                 # client already has by checking linkrevs. See the



To: pulkit, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D5782: changegroup: don't try to prune manifest nodes if not ellipses

pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5f9d057ba28c: changegroup: don&#039;t try to prune manifest nodes if not ellipses (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5782?vs=13646&id=14129

REVISION DETAIL
  https://phab.mercurial-scm.org/D5782

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -1073,6 +1073,11 @@
                 # because of narrow clones). Do this even for the root
                 # directory (tree=='')
                 prunednodes = []
+            elif not self._ellipses:
+                # In non-ellipses case and large repositories, it is better to
+                # prevent calling of store.rev and store.linkrev on a lot of
+                # nodes as compared to sending some extra data
+                prunednodes = nodes.copy()
             else:
                 # Avoid sending any manifest nodes we can prove the
                 # client already has by checking linkrevs. See the



To: pulkit, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel