Skip to content

Draft: Cache magnetic field file content in MagneticFieldGridReader

Wouter Hulsbergen requested to merge whgr_cachemagfieldfilecontent into 2024-patches

The reading of the magnetic field files is rather slow. When processing data with may iov changes this becomes an issue. This MR changes the files reader such that it caches the contents of the files. (The copying to the geometry will still occur.) This solution speeds up the reading of the magnetic field condition by almost two orders of magnitude, in all but the first occurrence.

Thanks Gerhard for most of the implementation!

@graven @clemenci @bcouturi

Edited by Wouter Hulsbergen

Merge request reports