CGNS Reader : caching data for unsteady analysis
The reader is very slow when reading unsteady data where mesh points are constant. As it is done for other file format (Exodus, PLOT3D ...), an efficient solution would be to add a CacheMesh option to the CGNS Reader. Thus, if there is no GridPointers and this option is activated by the user, the reader will try to store a vtkPoint object in a "Cache" with a key based on the tuple (basename, zonename). The caching policy should be of Most Recently Used type since the file access is cyclic. If all zone of the local processor can be put in the cache object, the gain would be terrific. Having the possibility to cache every volume mesh or adjust the cache size may be an interesting feature.
The workflow would then be:
- when reading volume mesh try to retrieve vtkPoints from the mesh cache
- if found use it and have a speed up
- else read from the file and add to cache When adding to the cache, cache policy will be applied to fit size constraint or not
If it shows a good behavior on mesh points, a similar Cache object could also be added for connectivity storage.
Where would it be better to create/attach a MeshCache object to the CGNS Reader ? Does a generic vtkCacheData class already exists ?