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