-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
At the moment every time a GRIB file is opened cfgrib needs to scan all the messages in the file to build the index that is then used to compute the values of the coordinates and build the hypercube representation of the variables.
Worse, when opening a GRIB file with the convenience function open_datasets the index is discarded every time the recursive call fails and the expensive file scan is done again.
Proposed implementation requirements for the feature are:
- save the index to disk with
path+.idximmediately after computation- a pickle of the in-memory structure is the simplest implementation
- shall not fail if the index cannot be written (file can be on a read only filesystem)
- when opening a file search for the
path+.idxindex file, test that it is in sync with the GRIB file and load it- timestamp ordering is enough for now
- do not fail if the index is corrupt
- use locking to avoid concurrent writes or reads and write
- concurrents reads must be ok
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request