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
Turns out that lru_cache binds globally where it is defined, so the caches are shared between the different mapper types, e.g., adding a print inside the cached ENDPOINT method of the reference and structure mappers, you see the following behaviour:
i.e., since the maxsize on the cache is only 1, only successive calls to the same mapper are cached.
This behaviour is a bit unexpected and also be traced to various memory leaks; I don't think we need to worry about these specifically as we are not actually creating instances of the class (see this video for more info).
So, the simplest fix is just to increase the cache sizes so that each of the mapper caches can fit.
The text was updated successfully, but these errors were encountered:
Turns out that
lru_cache
binds globally where it is defined, so the caches are shared between the different mapper types, e.g., adding a print inside the cachedENDPOINT
method of the reference and structure mappers, you see the following behaviour:i.e., since the
maxsize
on the cache is only 1, only successive calls to the same mapper are cached.This behaviour is a bit unexpected and also be traced to various memory leaks; I don't think we need to worry about these specifically as we are not actually creating instances of the class (see this video for more info).
So, the simplest fix is just to increase the cache sizes so that each of the mapper caches can fit.
The text was updated successfully, but these errors were encountered: