-
Notifications
You must be signed in to change notification settings - Fork 38
Description
The dev branch has a feature that caches a spatial index of CellIDs per rank, for fast creation of the fileindex mapping. This enables fast [O(0.01)s] point queries when the index cache exists, even for large runs like FID.
Cache construction for a given file is driven by this function, and the cache is automatically found when subsequently creating the VlsvReader again for the file.
However, the rtree package (and the underlying libspatialindex) that handles the Rtree construction and file caching is a bit stupid in that that it will access and potentially modify the file cache - the index objects are not thread-safe, but this is a rather extensive take on not being thread-safe.
The cache files for each vlsv files are these:
analysator/analysator/pyVlsv/vlsvcache.py
Line 95 in e314024
| self.__rtree_idxfile = os.path.join(self.get_cache_folder(),"rtree.idx") |
More stable solutions would be preferred, for example adapting a pure C++ library to both Analysator and Vlasiator: https://github.com/nushoin/RTree