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

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

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

marmoute (Pierre-Yves David)
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

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()



To: Alphare, #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
|

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

marmoute (Pierre-Yves David)
Alphare updated this revision to Diff 18041.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7119?vs=17201&id=18041

BRANCH
  default

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

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1242,6 +1242,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()



To: Alphare, #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
|

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

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
Alphare updated this revision to Diff 18565.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7119?vs=18041&id=18565

BRANCH
  default

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

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1245,6 +1245,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()



To: Alphare, #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
|

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

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
marmoute added a comment.


  What's up on this? It appears to have been
 
    x  29641ceacf8c
    |    pruned using prune by Martin von Zweigbergk <[hidden email]> (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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
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 <[hidden email]> (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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

marmoute (Pierre-Yves David)
In reply to this post by marmoute (Pierre-Yves David)
Closed by commit rHGbed8d08cfcb2: rust-dirstatemap: remove additional lookup in dirstate.matches (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7119?vs=18565&id=20170

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

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1262,6 +1262,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()



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