[pypy-commit] benchmarks default: Stop Krakatau from using cache files.

ltratt noreply at buildbot.pypy.org
Thu Dec 11 13:37:29 CET 2014


Author: Laurence Tratt <laurie at tratt.net>
Branch: 
Changeset: r295:d1adfc92d840
Date: 2014-12-11 12:35 +0000
http://bitbucket.org/pypy/benchmarks/changeset/d1adfc92d840/

Log:	Stop Krakatau from using cache files.

diff --git a/lib/Krakatau/Krakatau/stdcache.py b/lib/Krakatau/Krakatau/stdcache.py
--- a/lib/Krakatau/Krakatau/stdcache.py
+++ b/lib/Krakatau/Krakatau/stdcache.py
@@ -6,11 +6,9 @@
         self.env = env
         self.filename = filename
 
-        try:
-            with open(self.filename, 'rb') as f:
-                fdata = f.read()
-        except IOError:
-            fdata = ''
+        # XXX for a benchmark, we don't ever want to use a cache, so we simply
+        # don't load data from a cache file (even if it exists)
+        fdata = ''
 
         #Note, we assume \n will never appear in a class name. This should be true for classes in the Java package,
         #but isn't necessarily true for user defined classes (Which we don't cache anyway)
@@ -46,4 +44,4 @@
         class_ = self.env.getClass(name, partial=True)
         if shouldCache(name):
             self._cache_info(class_)
-        return class_.flags
\ No newline at end of file
+        return class_.flags


More information about the pypy-commit mailing list