Open NicoKiaru opened 2 years ago
Converted to draft because I needed to double check that changing the cache a posteriori does not bring unexpected issues (I can confirm the performance improvement, but not exactly the way it's done in the PR)
Works fine, so I'm removing the draft status
Hi @tpietzsch,
Do you think you could your opinion on this PR ? Do you think it's in good shape or is there something with the modifications which does not look nice to you ?
Adds a CacheOverrider interface and implementations of this interface in:
Adds a constructor in VolatileGlobalCellCache with a LoaderCache argument.
Together these modifications allow to get a finer control over the caching mechanism used when loading a dataset. In practice, using a BoundedSoftRefLoaderCache with a fixed number a cells instead of a SoftRefLoaderCache can lead to very significant performance improvement. Cached cells can be released: 1 - before the RAM gets full, 2 - more efficiently (and aggressively) than when SoftRefs are released by the garbage collector.
This PR maintains backward compatibility and does not modify the default behaviour (SoftRefLoaderCache).