[hdf-compass] 77/295: Remove HDF5-based caching

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.

commit 4f8f69a3fad189c4d4f046254ceefe6ba8901da4
Author: Andrew Collette <andrew.collette at gmail.com>
Date:   Thu May 7 22:59:48 2015 -0600

    Remove HDF5-based caching
---
 hdf5_model/__init__.py | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/hdf5_model/__init__.py b/hdf5_model/__init__.py
index 4b3b1e8..f583de3 100644
--- a/hdf5_model/__init__.py
+++ b/hdf5_model/__init__.py
@@ -44,9 +44,7 @@ class HDF5Store(compass_model.Store):
     """
 
     file_extensions = {'HDF5 File': ['*.hdf5', '*.h5']}
-    
-    CACHE_NSLOTS = 521          # Cache tuning parameter; see HDF5 docs
-    CACHE_NBYTES = int(25e6)    # Cache at most this many bytes per dataset
+
     
     def __contains__(self, key):
         return key in self.f
@@ -87,14 +85,8 @@ class HDF5Store(compass_model.Store):
             raise ValueError(url)
         self._url = url
         path = url.replace('file://','')
+        self.f = h5py.File(path, 'r')
         
-        fapl = h5py.h5p.create(h5py.h5p.FILE_ACCESS)
-        # First argument is ignored by HDF5.
-        # Last argument adjusts the preemption policy (0.0 = simple LRU)
-        fapl.set_cache(0, self.CACHE_NSLOTS, self.CACHE_NBYTES, 0.0)
-        fid = h5py.h5f.open(path, h5py.h5f.ACC_RDONLY, fapl=fapl)
-        self.f = h5py.File(fid)
-
     def close(self):
         self.f.close()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git



More information about the debian-science-commits mailing list