D7070: copies: extract data extraction into a `revinfo` function

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Oct 16 12:26:33 EDT 2019


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


More information about the Mercurial-devel mailing list