diff --git a/km3io/offline.py b/km3io/offline.py index c9a8d51d9618bbd5e1637dbbe51b4f37a1aca814..d3f66fb59791df50869e6418ce723c63a993d218 100644 --- a/km3io/offline.py +++ b/km3io/offline.py @@ -7,6 +7,10 @@ from .tools import Branch, BranchMapper, cached_property, _to_num MAIN_TREE_NAME = "E" EXCLUDE_KEYS = ["AAObject", "t", "fBits", "fUniqueID"] +# 110 MB based on the size of the largest basket found so far in km3net +BASKET_CACHE_SIZE = 110 * 1024**2 +BASKET_CACHE = uproot.cache.ThreadSafeArrayCache(BASKET_CACHE_SIZE) + def _nested_mapper(key): """Maps a key in the ROOT file to another key (e.g. trks.pos.x -> pos_x)"""