changeset 32690:3fad59faba8a

obsstore: separate marker parsing from obsstore reading This allows us to get raw obsstore content without parsing any markers. Reading obsstore is much cheaper than parsing markers.
author Jun Wu <quark@fb.com>
date Fri, 02 Jun 2017 20:38:01 -0700
parents 9933410bf763
children 5d8dd6c90af9
files mercurial/obsolete.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/obsolete.py	Fri Jun 02 19:34:56 2017 -0700
+++ b/mercurial/obsolete.py	Fri Jun 02 20:38:01 2017 -0700
@@ -666,8 +666,12 @@
         return self.add(transaction, markers)
 
     @propertycache
+    def _data(self):
+        return self.svfs.tryread('obsstore')
+
+    @propertycache
     def _all(self):
-        data = self.svfs.tryread('obsstore')
+        data = self._data
         if not data:
             return []
         self._version, markers = _readmarkers(data)