Submitter | phabricator |
---|---|
Date | Oct. 12, 2019, 4:46 p.m. |
Message ID | <differential-rev-PHID-DREV-vkufzejyivwd2fgsq34g-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/42270/ |
State | Superseded |
Headers | show |
Comments
martinvonz added a comment. The extracted function slows down `hg perfpathcopies FIREFOX_BETA_59_END FIREFOX_BETA_60_BASE` (not merge-heavy) from 3.55s to 3.87s, but since you also changed `ctx.p[12]copies()` to `ctx._copies` it ended up being a net speed improvement (3.24s including for the patch as written). REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7070/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7070 To: marmoute, #hg-reviewers Cc: martinvonz, mercurial-devel
marmoute added a comment.
In D7070#104100 <https://phab.mercurial-scm.org/D7070#104100>, @martinvonz wrote:
> The extracted function slows down `hg perfpathcopies FIREFOX_BETA_59_END FIREFOX_BETA_60_BASE` (not merge-heavy) from 3.55s to 3.87s, but since you also changed `ctx.p[12]copies()` to `ctx._copies` it ended up being a net speed improvement (3.24s including for the patch as written).
Which method are you using on this repository ? extra+changeset-only ?
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7070/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7070
To: marmoute, #hg-reviewers
Cc: martinvonz, mercurial-devel
martinvonz added a comment. In D7070#104159 <https://phab.mercurial-scm.org/D7070#104159>, @marmoute wrote: > In D7070#104100 <https://phab.mercurial-scm.org/D7070#104100>, @martinvonz wrote: > >> The extracted function slows down `hg perfpathcopies FIREFOX_BETA_59_END FIREFOX_BETA_60_BASE` (not merge-heavy) from 3.55s to 3.87s, but since you also changed `ctx.p[12]copies()` to `ctx._copies` it ended up being a net speed improvement (3.24s including for the patch as written). > > Which method are you using on this repository ? extra+changeset-only ? Yes. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7070/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7070 To: marmoute, #hg-reviewers Cc: martinvonz, mercurial-devel
martinvonz added a comment. In D7070#104170 <https://phab.mercurial-scm.org/D7070#104170>, @martinvonz wrote: > In D7070#104159 <https://phab.mercurial-scm.org/D7070#104159>, @marmoute wrote: > >> In D7070#104100 <https://phab.mercurial-scm.org/D7070#104100>, @martinvonz wrote: >> >>> The extracted function slows down `hg perfpathcopies FIREFOX_BETA_59_END FIREFOX_BETA_60_BASE` (not merge-heavy) from 3.55s to 3.87s, but since you also changed `ctx.p[12]copies()` to `ctx._copies` it ended up being a net speed improvement (3.24s including for the patch as written). >> >> Which method are you using on this repository ? extra+changeset-only ? > > Yes. Sorry, I should say that that's of course I version of mozilla-unified that I've converted. Let me know if you want a copy of it, but I suspect that you'll see similar numbers in your repos. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7070/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7070 To: marmoute, #hg-reviewers Cc: martinvonz, mercurial-devel
marmoute added a comment. In D7070#104172 <https://phab.mercurial-scm.org/D7070#104172>, @martinvonz wrote: > In D7070#104170 <https://phab.mercurial-scm.org/D7070#104170>, @martinvonz wrote: > >> In D7070#104159 <https://phab.mercurial-scm.org/D7070#104159>, @marmoute wrote: >> >>> In D7070#104100 <https://phab.mercurial-scm.org/D7070#104100>, @martinvonz wrote: >>> >>>> The extracted function slows down `hg perfpathcopies FIREFOX_BETA_59_END FIREFOX_BETA_60_BASE` (not merge-heavy) from 3.55s to 3.87s, but since you also changed `ctx.p[12]copies()` to `ctx._copies` it ended up being a net speed improvement (3.24s including for the patch as written). >>> >>> Which method are you using on this repository ? extra+changeset-only ? >> >> Yes. > > Sorry, I should say that that's of course I version of mozilla-unified that I've converted. Let me know if you want a copy of it, but I suspect that you'll see similar numbers in your repos. I finnaly got to run this on a stable machine, I don't see any sign of this in the repository I use for test: BASE ---- revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 ! wall 2.879817 comb 2.890000 user 2.870000 sys 0.020000 (best of 10) ! wall 2.935990 comb 2.930000 user 2.910000 sys 0.020000 (max of 10) ! wall 2.891474 comb 2.890000 user 2.866000 sys 0.024000 (avg of 10) ! wall 2.888251 comb 2.890000 user 2.860000 sys 0.030000 (median of 10) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 ! wall 4.246007 comb 4.250000 user 4.210000 sys 0.040000 (best of 10) ! wall 4.284882 comb 4.280000 user 4.230000 sys 0.050000 (max of 10) ! wall 4.259378 comb 4.258000 user 4.208000 sys 0.050000 (avg of 10) ! wall 4.259012 comb 4.250000 user 4.190000 sys 0.060000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 ! wall 0.766429 comb 0.770000 user 0.770000 sys 0.000000 (best of 13) ! wall 0.817303 comb 0.820000 user 0.800000 sys 0.020000 (max of 13) ! wall 0.773238 comb 0.773077 user 0.769231 sys 0.003846 (avg of 13) ! wall 0.768693 comb 0.770000 user 0.770000 sys 0.000000 (median of 13) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f ! wall 0.013553 comb 0.010000 user 0.010000 sys 0.000000 (best of 219) ! wall 0.036295 comb 0.040000 user 0.030000 sys 0.010000 (max of 219) ! wall 0.013708 comb 0.013699 user 0.013607 sys 0.000091 (avg of 219) ! wall 0.013600 comb 0.020000 user 0.020000 sys 0.000000 (median of 219) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 ! wall 0.003166 comb 0.010000 user 0.010000 sys 0.000000 (best of 934) ! wall 0.014872 comb 0.010000 user 0.010000 sys 0.000000 (max of 934) ! wall 0.003205 comb 0.003180 user 0.003180 sys 0.000000 (avg of 934) ! wall 0.003187 comb 0.010000 user 0.010000 sys 0.000000 (median of 934) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e ! wall 0.000075 comb 0.000000 user 0.000000 sys 0.000000 (best of 11983) ! wall 0.001774 comb 0.000000 user 0.000000 sys 0.000000 (max of 11983) ! wall 0.000078 comb 0.000082 user 0.000081 sys 0.000001 (avg of 11983) ! wall 0.000078 comb 0.000000 user 0.000000 sys 0.000000 (median of 11983) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe ! wall 0.509171 comb 0.510000 user 0.500000 sys 0.010000 (best of 20) ! wall 0.531145 comb 0.530000 user 0.520000 sys 0.010000 (max of 20) ! wall 0.511194 comb 0.511000 user 0.506000 sys 0.005000 (avg of 20) ! wall 0.509943 comb 0.510000 user 0.510000 sys 0.000000 (median of 20) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d ! wall 0.125980 comb 0.130000 user 0.130000 sys 0.000000 (best of 79) ! wall 0.174518 comb 0.170000 user 0.160000 sys 0.010000 (max of 79) ! wall 0.127100 comb 0.127089 user 0.126329 sys 0.000759 (avg of 79) ! wall 0.126383 comb 0.130000 user 0.130000 sys 0.000000 (median of 79) Using copies ------------ revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 ! wall 2.878113 comb 2.880000 user 2.870000 sys 0.010000 (best of 10) ! wall 2.933048 comb 2.930000 user 2.870000 sys 0.060000 (max of 10) ! wall 2.888757 comb 2.889000 user 2.864000 sys 0.025000 (avg of 10) ! wall 2.884303 comb 2.890000 user 2.870000 sys 0.020000 (median of 10) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 ! wall 4.284253 comb 4.290000 user 4.250000 sys 0.040000 (best of 10) ! wall 4.330466 comb 4.320000 user 4.260000 sys 0.060000 (max of 10) ! wall 4.297149 comb 4.297000 user 4.249000 sys 0.048000 (avg of 10) ! wall 4.294819 comb 4.290000 user 4.230000 sys 0.060000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 ! wall 0.764922 comb 0.760000 user 0.760000 sys 0.000000 (best of 13) ! wall 0.818637 comb 0.820000 user 0.800000 sys 0.020000 (max of 13) ! wall 0.771713 comb 0.771538 user 0.768462 sys 0.003077 (avg of 13) ! wall 0.767346 comb 0.760000 user 0.760000 sys 0.000000 (median of 13) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f ! wall 0.013501 comb 0.020000 user 0.020000 sys 0.000000 (best of 220) ! wall 0.036179 comb 0.030000 user 0.020000 sys 0.010000 (max of 220) ! wall 0.013653 comb 0.013636 user 0.013545 sys 0.000091 (avg of 220) ! wall 0.013541 comb 0.010000 user 0.010000 sys 0.000000 (median of 220) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 ! wall 0.003193 comb 0.000000 user 0.000000 sys 0.000000 (best of 926) ! wall 0.014913 comb 0.020000 user 0.020000 sys 0.000000 (max of 926) ! wall 0.003232 comb 0.003240 user 0.003229 sys 0.000011 (avg of 926) ! wall 0.003215 comb 0.000000 user 0.000000 sys 0.000000 (median of 926) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e ! wall 0.000075 comb 0.000000 user 0.000000 sys 0.000000 (best of 12105) ! wall 0.001771 comb 0.000000 user 0.000000 sys 0.000000 (max of 12105) ! wall 0.000077 comb 0.000078 user 0.000076 sys 0.000002 (avg of 12105) ! wall 0.000077 comb 0.000000 user 0.000000 sys 0.000000 (median of 12105) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe ! wall 0.511859 comb 0.510000 user 0.510000 sys 0.000000 (best of 20) ! wall 0.534287 comb 0.530000 user 0.520000 sys 0.010000 (max of 20) ! wall 0.514056 comb 0.514000 user 0.509500 sys 0.004500 (avg of 20) ! wall 0.512764 comb 0.520000 user 0.510000 sys 0.010000 (median of 20) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d ! wall 0.125671 comb 0.130000 user 0.130000 sys 0.000000 (best of 79) ! wall 0.173899 comb 0.170000 user 0.160000 sys 0.010000 (max of 79) ! wall 0.126927 comb 0.126835 user 0.126203 sys 0.000633 (avg of 79) ! wall 0.126241 comb 0.120000 user 0.120000 sys 0.000000 (median of 79) moving things to revinfo and stop using ctx.p1() ------------------------------------------------ revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 ! wall 2.706154 comb 2.700000 user 2.690000 sys 0.010000 (best of 10) ! wall 2.757786 comb 2.770000 user 2.730000 sys 0.040000 (max of 10) ! wall 2.719896 comb 2.720000 user 2.702000 sys 0.018000 (avg of 10) ! wall 2.719768 comb 2.720000 user 2.690000 sys 0.030000 (median of 10) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 ! wall 3.997817 comb 3.990000 user 3.970000 sys 0.020000 (best of 10) ! wall 4.049241 comb 4.050000 user 3.980000 sys 0.070000 (max of 10) ! wall 4.012740 comb 4.012000 user 3.966000 sys 0.046000 (avg of 10) ! wall 4.008443 comb 4.010000 user 3.970000 sys 0.040000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 ! wall 0.697971 comb 0.690000 user 0.690000 sys 0.000000 (best of 15) ! wall 0.750741 comb 0.750000 user 0.750000 sys 0.000000 (max of 15) ! wall 0.704284 comb 0.704000 user 0.700667 sys 0.003333 (avg of 15) ! wall 0.700967 comb 0.700000 user 0.700000 sys 0.000000 (median of 15) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f ! wall 0.013525 comb 0.010000 user 0.010000 sys 0.000000 (best of 220) ! wall 0.036581 comb 0.040000 user 0.030000 sys 0.010000 (max of 220) ! wall 0.013664 comb 0.013682 user 0.013545 sys 0.000136 (avg of 220) ! wall 0.013555 comb 0.020000 user 0.020000 sys 0.000000 (median of 220) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 ! wall 0.003000 comb 0.000000 user 0.000000 sys 0.000000 (best of 986) ! wall 0.014664 comb 0.010000 user 0.010000 sys 0.000000 (max of 986) ! wall 0.003037 comb 0.003032 user 0.003022 sys 0.000010 (avg of 986) ! wall 0.003021 comb 0.000000 user 0.000000 sys 0.000000 (median of 986) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e ! wall 0.000071 comb 0.000000 user 0.000000 sys 0.000000 (best of 12667) ! wall 0.001737 comb 0.000000 user 0.000000 sys 0.000000 (max of 12667) ! wall 0.000074 comb 0.000074 user 0.000073 sys 0.000001 (avg of 12667) ! wall 0.000073 comb 0.000000 user 0.000000 sys 0.000000 (median of 12667) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe ! wall 0.471255 comb 0.460000 user 0.460000 sys 0.000000 (best of 22) ! wall 0.493958 comb 0.500000 user 0.490000 sys 0.010000 (max of 22) ! wall 0.473442 comb 0.473636 user 0.470909 sys 0.002727 (avg of 22) ! wall 0.472525 comb 0.480000 user 0.470000 sys 0.010000 (median of 22) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d ! wall 0.114850 comb 0.120000 user 0.120000 sys 0.000000 (best of 87) ! wall 0.162910 comb 0.160000 user 0.150000 sys 0.010000 (max of 87) ! wall 0.115880 comb 0.115862 user 0.114828 sys 0.001034 (avg of 87) ! wall 0.115197 comb 0.110000 user 0.110000 sys 0.000000 (median of 87) REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7070/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7070 To: marmoute, #hg-reviewers Cc: martinvonz, mercurial-devel
marmoute added a comment. I splitted the usage of changelog.parent out of the extraction of revinfo to measure things further. That step give a small perf boost. Adding a function call comes with a tiny performance cost: revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 base: ! wall 2.865956 comb 2.870000 user 2.860000 sys 0.010000 (best of 10) ! wall 2.883595 comb 2.880000 user 2.850000 sys 0.030000 (max of 10) ! wall 2.874258 comb 2.875000 user 2.856000 sys 0.019000 (avg of 10) ! wall 2.875384 comb 2.880000 user 2.850000 sys 0.030000 (median of 10) use _copies: ! wall 2.881628 comb 2.890000 user 2.870000 sys 0.020000 (best of 10) ! wall 2.892304 comb 2.890000 user 2.870000 sys 0.020000 (max of 10) ! wall 2.886310 comb 2.887000 user 2.866000 sys 0.021000 (avg of 10) ! wall 2.885636 comb 2.900000 user 2.870000 sys 0.030000 (median of 10) use p1, p2: ! wall 2.696648 comb 2.700000 user 2.680000 sys 0.020000 (best of 10) ! wall 2.705893 comb 2.720000 user 2.670000 sys 0.050000 (max of 10) ! wall 2.701837 comb 2.703000 user 2.679000 sys 0.024000 (avg of 10) ! wall 2.702270 comb 2.710000 user 2.690000 sys 0.020000 (median of 10) use revinfo: ! wall 2.712199 comb 2.710000 user 2.670000 sys 0.040000 (best of 10) ! wall 2.726547 comb 2.720000 user 2.690000 sys 0.030000 (max of 10) ! wall 2.718612 comb 2.718000 user 2.696000 sys 0.022000 (avg of 10) ! wall 2.717861 comb 2.720000 user 2.700000 sys 0.020000 (median of 10) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 base: ! wall 4.223027 comb 4.220000 user 4.170000 sys 0.050000 (best of 10) ! wall 4.244466 comb 4.250000 user 4.210000 sys 0.040000 (max of 10) ! wall 4.232495 comb 4.232000 user 4.191000 sys 0.041000 (avg of 10) ! wall 4.234116 comb 4.220000 user 4.170000 sys 0.050000 (median of 10) use _copies: ! wall 4.285500 comb 4.290000 user 4.250000 sys 0.040000 (best of 10) ! wall 4.320013 comb 4.320000 user 4.260000 sys 0.060000 (max of 10) ! wall 4.297728 comb 4.298000 user 4.238000 sys 0.060000 (avg of 10) ! wall 4.298271 comb 4.290000 user 4.240000 sys 0.050000 (median of 10) use p1, p2: ! wall 3.961891 comb 3.960000 user 3.920000 sys 0.040000 (best of 10) ! wall 3.985166 comb 3.990000 user 3.940000 sys 0.050000 (max of 10) ! wall 3.975511 comb 3.975000 user 3.922000 sys 0.053000 (avg of 10) ! wall 3.976610 comb 3.970000 user 3.920000 sys 0.050000 (median of 10) use revinfo: ! wall 3.994866 comb 4.000000 user 3.960000 sys 0.040000 (best of 10) ! wall 4.013087 comb 4.020000 user 3.980000 sys 0.040000 (max of 10) ! wall 4.004121 comb 4.004000 user 3.956000 sys 0.048000 (avg of 10) ! wall 4.003146 comb 4.010000 user 3.970000 sys 0.040000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 base: ! wall 0.761661 comb 0.760000 user 0.760000 sys 0.000000 (best of 12) ! wall 0.769859 comb 0.770000 user 0.770000 sys 0.000000 (max of 12) ! wall 0.764127 comb 0.764167 user 0.761667 sys 0.002500 (avg of 12) ! wall 0.763463 comb 0.760000 user 0.760000 sys 0.000000 (median of 12) use _copies: ! wall 0.772964 comb 0.770000 user 0.770000 sys 0.000000 (best of 11) ! wall 0.779577 comb 0.780000 user 0.780000 sys 0.000000 (max of 11) ! wall 0.774532 comb 0.774545 user 0.772727 sys 0.001818 (avg of 11) ! wall 0.773397 comb 0.770000 user 0.770000 sys 0.000000 (median of 11) use p1, p2: ! wall 0.698676 comb 0.700000 user 0.690000 sys 0.010000 (best of 13) ! wall 0.707270 comb 0.710000 user 0.700000 sys 0.010000 (max of 13) ! wall 0.701908 comb 0.701538 user 0.697692 sys 0.003846 (avg of 13) ! wall 0.701634 comb 0.700000 user 0.700000 sys 0.000000 (median of 13) use revinfo: ! wall 0.702850 comb 0.710000 user 0.710000 sys 0.000000 (best of 13) ! wall 0.710219 comb 0.710000 user 0.700000 sys 0.010000 (max of 13) ! wall 0.704854 comb 0.703846 user 0.700769 sys 0.003077 (avg of 13) ! wall 0.704204 comb 0.700000 user 0.700000 sys 0.000000 (median of 13) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f base: ! wall 0.013473 comb 0.020000 user 0.020000 sys 0.000000 (best of 219) ! wall 0.013663 comb 0.010000 user 0.010000 sys 0.000000 (max of 219) ! wall 0.013511 comb 0.013516 user 0.013425 sys 0.000091 (avg of 219) ! wall 0.013506 comb 0.020000 user 0.020000 sys 0.000000 (median of 219) use _copies: ! wall 0.013549 comb 0.010000 user 0.010000 sys 0.000000 (best of 217) ! wall 0.013755 comb 0.010000 user 0.010000 sys 0.000000 (max of 217) ! wall 0.013596 comb 0.013594 user 0.013502 sys 0.000092 (avg of 217) ! wall 0.013585 comb 0.010000 user 0.010000 sys 0.000000 (median of 217) use p1, p2: ! wall 0.013512 comb 0.020000 user 0.020000 sys 0.000000 (best of 218) ! wall 0.013622 comb 0.010000 user 0.010000 sys 0.000000 (max of 218) ! wall 0.013554 comb 0.013532 user 0.013486 sys 0.000046 (avg of 218) ! wall 0.013550 comb 0.010000 user 0.010000 sys 0.000000 (median of 218) use revinfo: ! wall 0.013452 comb 0.020000 user 0.020000 sys 0.000000 (best of 219) ! wall 0.013614 comb 0.020000 user 0.020000 sys 0.000000 (max of 219) ! wall 0.013497 comb 0.013470 user 0.013379 sys 0.000091 (avg of 219) ! wall 0.013493 comb 0.020000 user 0.020000 sys 0.000000 (median of 219) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 base: ! wall 0.003184 comb 0.000000 user 0.000000 sys 0.000000 (best of 928) ! wall 0.004420 comb 0.010000 user 0.010000 sys 0.000000 (max of 928) ! wall 0.003207 comb 0.003222 user 0.003211 sys 0.000011 (avg of 928) ! wall 0.003204 comb 0.010000 user 0.010000 sys 0.000000 (median of 928) use _copies: ! wall 0.003184 comb 0.000000 user 0.000000 sys 0.000000 (best of 929) ! wall 0.004369 comb 0.010000 user 0.010000 sys 0.000000 (max of 929) ! wall 0.003205 comb 0.003197 user 0.003197 sys 0.000000 (avg of 929) ! wall 0.003202 comb 0.000000 user 0.000000 sys 0.000000 (median of 929) use p1, p2: ! wall 0.002973 comb 0.000000 user 0.000000 sys 0.000000 (best of 992) ! wall 0.004192 comb 0.000000 user 0.000000 sys 0.000000 (max of 992) ! wall 0.002998 comb 0.002984 user 0.002974 sys 0.000010 (avg of 992) ! wall 0.002993 comb 0.010000 user 0.010000 sys 0.000000 (median of 992) use revinfo: ! wall 0.002995 comb 0.000000 user 0.000000 sys 0.000000 (best of 985) ! wall 0.004206 comb 0.000000 user 0.000000 sys 0.000000 (max of 985) ! wall 0.003022 comb 0.003015 user 0.003005 sys 0.000010 (avg of 985) ! wall 0.003017 comb 0.000000 user 0.000000 sys 0.000000 (median of 985) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e base: ! wall 0.000075 comb 0.000000 user 0.000000 sys 0.000000 (best of 12096) ! wall 0.000234 comb 0.000000 user 0.000000 sys 0.000000 (max of 12096) ! wall 0.000077 comb 0.000076 user 0.000075 sys 0.000001 (avg of 12096) ! wall 0.000077 comb 0.000000 user 0.000000 sys 0.000000 (median of 12096) use _copies: ! wall 0.000075 comb 0.000000 user 0.000000 sys 0.000000 (best of 12060) ! wall 0.000203 comb 0.000000 user 0.000000 sys 0.000000 (max of 12060) ! wall 0.000077 comb 0.000080 user 0.000080 sys 0.000000 (avg of 12060) ! wall 0.000077 comb 0.000000 user 0.000000 sys 0.000000 (median of 12060) use p1, p2: ! wall 0.000070 comb 0.000000 user 0.000000 sys 0.000000 (best of 12804) ! wall 0.000194 comb 0.000000 user 0.000000 sys 0.000000 (max of 12804) ! wall 0.000073 comb 0.000072 user 0.000070 sys 0.000002 (avg of 12804) ! wall 0.000072 comb 0.000000 user 0.000000 sys 0.000000 (median of 12804) use revinfo: ! wall 0.000071 comb 0.000000 user 0.000000 sys 0.000000 (best of 12672) ! wall 0.000198 comb 0.000000 user 0.000000 sys 0.000000 (max of 12672) ! wall 0.000074 comb 0.000073 user 0.000073 sys 0.000001 (avg of 12672) ! wall 0.000073 comb 0.000000 user 0.000000 sys 0.000000 (median of 12672) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe base: ! wall 0.516249 comb 0.510000 user 0.510000 sys 0.000000 (best of 18) ! wall 0.524011 comb 0.520000 user 0.520000 sys 0.000000 (max of 18) ! wall 0.518511 comb 0.518889 user 0.515556 sys 0.003333 (avg of 18) ! wall 0.518508 comb 0.520000 user 0.510000 sys 0.010000 (median of 18) use _copies: ! wall 0.509514 comb 0.510000 user 0.510000 sys 0.000000 (best of 18) ! wall 0.516439 comb 0.510000 user 0.500000 sys 0.010000 (max of 18) ! wall 0.510827 comb 0.511111 user 0.506667 sys 0.004444 (avg of 18) ! wall 0.510614 comb 0.500000 user 0.500000 sys 0.000000 (median of 18) use p1, p2: ! wall 0.472743 comb 0.470000 user 0.460000 sys 0.010000 (best of 20) ! wall 0.478819 comb 0.490000 user 0.480000 sys 0.010000 (max of 20) ! wall 0.473699 comb 0.473500 user 0.470000 sys 0.003500 (avg of 20) ! wall 0.473681 comb 0.470000 user 0.470000 sys 0.000000 (median of 20) use revinfo: ! wall 0.477428 comb 0.480000 user 0.480000 sys 0.000000 (best of 19) ! wall 0.484323 comb 0.490000 user 0.480000 sys 0.010000 (max of 19) ! wall 0.478444 comb 0.478947 user 0.475263 sys 0.003684 (avg of 19) ! wall 0.478061 comb 0.470000 user 0.470000 sys 0.000000 (median of 19) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d base: ! wall 0.125418 comb 0.120000 user 0.120000 sys 0.000000 (best of 77) ! wall 0.131472 comb 0.140000 user 0.140000 sys 0.000000 (max of 77) ! wall 0.126122 comb 0.126104 user 0.125325 sys 0.000779 (avg of 77) ! wall 0.126032 comb 0.130000 user 0.130000 sys 0.000000 (median of 77) use _copies: ! wall 0.126166 comb 0.130000 user 0.130000 sys 0.000000 (best of 77) ! wall 0.132032 comb 0.130000 user 0.130000 sys 0.000000 (max of 77) ! wall 0.126603 comb 0.126494 user 0.125844 sys 0.000649 (avg of 77) ! wall 0.126552 comb 0.130000 user 0.130000 sys 0.000000 (median of 77) use p1, p2: ! wall 0.114769 comb 0.120000 user 0.110000 sys 0.010000 (best of 85) ! wall 0.120964 comb 0.120000 user 0.120000 sys 0.000000 (max of 85) ! wall 0.115373 comb 0.115529 user 0.114824 sys 0.000706 (avg of 85) ! wall 0.115240 comb 0.110000 user 0.110000 sys 0.000000 (median of 85) use revinfo: ! wall 0.115782 comb 0.120000 user 0.120000 sys 0.000000 (best of 84) ! wall 0.121550 comb 0.130000 user 0.120000 sys 0.010000 (max of 84) ! wall 0.116160 comb 0.116071 user 0.115357 sys 0.000714 (avg of 84) ! wall 0.116015 comb 0.110000 user 0.110000 sys 0.000000 (median of 84) REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7070/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7070 To: marmoute, #hg-reviewers Cc: martinvonz, mercurial-devel
martinvonz added a comment. To clarify, you don't see any slowdown if you apply the following patch? diff --git a/mercurial/copies.py b/mercurial/copies.py - a/mercurial/copies.py +++ b/mercurial/copies.py @@ -192,7 +192,7 @@ def _revinfogetter(repo): def revinfo(rev): p1, p2 = cl.parentrevs(rev) ctx = repo[rev] - p1copies, p2copies = ctx._copies + p1copies, p2copies = ctx.p1copies(), ctx.p2copies() removed = ctx.filesremoved() return p1, p2, p1copies, p2copies, removed REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7070/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7070 To: marmoute, #hg-reviewers Cc: martinvonz, mercurial-devel
Patch
diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -264,12 +264,35 @@ return cm +def _revinfogetter(repo): + """return a function that return multiple data given a <rev>"i + + * p1: revision number of first parent + * p2: revision number of first parent + * p1copies: mapping of copies from p1 + * p2copies: mapping of copies from p2 + * removed: a list of removed files + """ + cl = repo.changelog + + def revinfo(rev): + p1, p2 = cl.parentrevs(rev) + ctx = repo[rev] + p1copies, p2copies = ctx._copies + removed = ctx.filesremoved() + return p1, p2, p1copies, p2copies, removed + + return revinfo + + def _changesetforwardcopies(a, b, match): if a.rev() in (node.nullrev, b.rev()): return {} repo = a.repo() children = {} + revinfo = _revinfogetter(repo) + cl = repo.changelog missingrevs = cl.findmissingrevs(common=[a.rev()], heads=[b.rev()]) for r in missingrevs: @@ -292,14 +315,14 @@ if r == b.rev(): return copies for i, c in enumerate(children[r]): - childctx = repo[c] - if r == childctx.p1().rev(): + p1, p2, p1copies, p2copies, removed = revinfo(c) + if r == p1: parent = 1 - childcopies = childctx.p1copies() + childcopies = p1copies else: - assert r == childctx.p2().rev() + assert r == p2 parent = 2 - childcopies = childctx.p2copies() + childcopies = p2copies if not alwaysmatch: childcopies = { dst: src for dst, src in childcopies.items() if match(dst) @@ -311,7 +334,7 @@ newcopies = copies if childcopies: newcopies = _chain(newcopies, childcopies) - for f in childctx.filesremoved(): + for f in removed: if f in newcopies: del newcopies[f] othercopies = all_copies.get(c)