You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In lots of different places in PyOP2 and Firedrake we have global caches implemented something like:
classMyObject:
_cache= {}
For long running simulations (e.g. CI) this results in a slow leaking of memory as this global cache gets larger and larger. Thetis for example needs to purge the cache at every test to avoid running out of memory.
It would be nice to have some sort of global pyop2.caching.cache_manager object to hide this. This would mean class-level caches would be implemented something like:
In lots of different places in PyOP2 and Firedrake we have global caches implemented something like:
For long running simulations (e.g. CI) this results in a slow leaking of memory as this global cache gets larger and larger. Thetis for example needs to purge the cache at every test to avoid running out of memory.
It would be nice to have some sort of global
pyop2.caching.cache_manager
object to hide this. This would mean class-level caches would be implemented something like:then later on in the simulation all (or some) of these caches can be cleaned using
cache_manager.clear()
.The text was updated successfully, but these errors were encountered: