D1253: dirstate: avoid reading the map when possible (issue5713) (issue5717)

lothiraldan (Boris Feld) phabricator at mercurial-scm.org
Fri Oct 27 10:27:43 EDT 2017


lothiraldan accepted this revision.
lothiraldan added a comment.


  It looks good to me.
  
  I did some quick and dirty performance check and I see a performance improvement. On the mozilla-central repository, without this change, I get these results:
  
    $ python -m perf command /home/lothiraldan/project/mercurial/mercurial/hg id -r .
    .....................
    command: Mean +- std dev: 154 ms +- 2 ms
    $ python -m perf command /home/lothiraldan/project/mercurial/mercurial/hg id -r .
    .....................
    command: Mean +- std dev: 154 ms +- 2 ms
    $ python -m perf command /home/lothiraldan/project/mercurial/mercurial/hg id -r .
    .....................
    command: Mean +- std dev: 156 ms +- 3 ms
  
  And with this changeset I get better results:
  
    $ python -m perf command /home/lothiraldan/project/mercurial/mercurial/hg id -r .
    .....................
    command: Mean +- std dev: 119 ms +- 3 ms
    $ python -m perf command /home/lothiraldan/project/mercurial/mercurial/hg id -r .
    .....................
    command: Mean +- std dev: 120 ms +- 3 ms
    $ python -m perf command /home/lothiraldan/project/mercurial/mercurial/hg id -r .
    .....................
    command: Mean +- std dev: 123 ms +- 7 ms
  
  Where perf is https://perf.readthedocs.io/en/latest/

REPOSITORY
  rHG Mercurial

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

To: durham, #hg-reviewers, lothiraldan
Cc: lothiraldan, mharbison72, mercurial-devel


More information about the Mercurial-devel mailing list