Patchwork D8047: rust-dirstate: add missing @propertycache

login
register
mail settings
Submitter phabricator
Date Jan. 30, 2020, 2:09 p.m.
Message ID <differential-rev-PHID-DREV-s2ec7q4uuevh4736qw23-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44771/
State Superseded
Headers show

Comments

phabricator - Jan. 30, 2020, 2:09 p.m.
Alphare created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  While investigating a regression on `hg update` performance introduced by the
  Rust `dirstatemap`, two missing `@propertycache` were identified when comparing
  against the Python implementation. This adds back the first one, that has
  no observable impact on behavior. The second one (`nonnormalset`) is going to
  be more involved, as the caching has to be done from the Rust side of things.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1849,7 +1849,7 @@ 
             nonnorm, otherparents = self._rustmap.nonnormalentries()
             return nonnorm
 
-        @property
+        @propertycache
         def otherparentset(self):
             nonnorm, otherparents = self._rustmap.nonnormalentries()
             return otherparents