Skip to content
Snippets Groups Projects
Commit 7667ff67 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Add cache

parent ebe4589a
No related branches found
No related tags found
1 merge request!27Refactor offline I/O
......@@ -503,7 +503,8 @@ class Usr:
# which has a different strucuter and key (usr_data)
# We do not support those...
self._usr_names = [
n.decode("utf-8") for n in tree['usr_names'].lazyarray()[0]
n.decode("utf-8") for n in tree['usr_names'].lazyarray(
basketcache=BASKET_CACHE)[0]
]
except (KeyError, IndexError): # e.g. old aanet files
self._usr_names = []
......@@ -665,8 +666,8 @@ class Branch:
elif isinstance(self._index, int):
return 1
else:
return len(
self._branch[self._keymap['id']].lazyarray()[self._index])
return len(self._branch[self._keymap['id']].lazyarray(
basketcache=BASKET_CACHE)[self._index])
def __str__(self):
return "Number of elements: {}".format(len(self._branch))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment