changeset 33292:1e9fd2c35ae3

sparse: remove reference to simplecache This is a 3rd party extension authored by Facebook. References in core are not appropriate. It will be possible to restore this code/optimization via monkeypatching. So Facebook won't lose any functionality. The removed code is important for performance. So add a comment tracking it.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 06 Jul 2017 10:54:23 -0700
parents 74923cec6fdb
children c9cbf4de27ba
files hgext/sparse.py
diffstat 1 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/sparse.py	Sat Jul 01 10:24:31 2017 -0700
+++ b/hgext/sparse.py	Thu Jul 06 10:54:23 2017 -0700
@@ -436,16 +436,9 @@
             return includes, excludes, profiles
 
         def getrawprofile(self, profile, changeid):
-            try:
-                simplecache = extensions.find('simplecache')
-                node = self[changeid].hex()
-                def func():
-                    return self.filectx(profile, changeid=changeid).data()
-                key = 'sparseprofile:%s:%s' % (profile.replace('/', '__'), node)
-                return simplecache.memoize(func, key,
-                        simplecache.stringserializer, self.ui)
-            except KeyError:
-                return self.filectx(profile, changeid=changeid).data()
+            # TODO add some kind of cache here because this incurs a manifest
+            # resolve and can be slow.
+            return self.filectx(profile, changeid=changeid).data()
 
         def sparsechecksum(self, filepath):
             fh = open(filepath)