Patchwork D7119: rust-dirstatemap: remove additional lookup in dirstate.matches

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2019, 1:49 p.m.
Message ID <differential-rev-PHID-DREV-w4u6mjx53vi3xklqr4un-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42385/
State Superseded
Headers show

Comments

phabricator - Oct. 16, 2019, 1:49 p.m.
Alphare created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We use the same trick as the Python implementation

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-devel
phabricator - Jan. 30, 2020, 6:23 p.m.
marmoute added a comment.


  What's up on this? It appears to have been
  
    x  29641ceacf8c
    |    pruned using prune by Martin von Zweigbergk <martinvonz@google.com> (Wed Dec 11 10:48:08 2019 -0800)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7119/new/

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

To: Alphare, #hg-reviewers
Cc: marmoute, mercurial-devel
phabricator - Jan. 30, 2020, 6:34 p.m.
martinvonz added a comment.


  In D7119#118735 <https://phab.mercurial-scm.org/D7119#118735>, @marmoute wrote:
  
  > What's up on this? It appears to have been
  >
  >   x  29641ceacf8c
  >   |    pruned using prune by Martin von Zweigbergk <martinvonz@google.com> (Wed Dec 11 10:48:08 2019 -0800)
  
  That's probably because I queued some version of it and then decided to not queue it (I had comments on the parent).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7119/new/

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

To: Alphare, #hg-reviewers
Cc: martinvonz, marmoute, mercurial-devel
phabricator - Feb. 7, 2020, 8:07 p.m.
marmoute added a comment.


  @Alphare so what should we do of this patch ?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7119/new/

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

To: Alphare, #hg-reviewers
Cc: martinvonz, marmoute, mercurial-devel
phabricator - Feb. 11, 2020, 9:45 a.m.
Alphare added a comment.


  In D7119#119792 <https://phab.mercurial-scm.org/D7119#119792>, @marmoute wrote:
  
  > @Alphare so what should we do of this patch ?
  
  IMO it should still be valid, it's harmless at best. I don't remember having strong performance numbers. Now that most of the status is done in Rust, it should  matter less, even though it could still help shave off a few milliseconds.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7119/new/

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

To: Alphare, #hg-reviewers
Cc: martinvonz, marmoute, mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1185,6 +1185,9 @@ 
         return files in the dirstate (in whatever state) filtered by match
         '''
         dmap = self._map
+        if rustmod is not None:
+            dmap = self._map._rustmap
+
         if match.always():
             return dmap.keys()
         files = match.files()