diff options
author | Jürg Billeter <j@bitron.ch> | 2019-02-26 08:34:33 +0100 |
---|---|---|
committer | Abderrahim Kitouni <akitouni@gnome.org> | 2020-08-26 12:47:05 +0100 |
commit | 7d10de6152a8078a6018f2dc32537e8bbfc526da (patch) | |
tree | 7276175d7584d8b88c03a3f05a08d7aa1dfbe19d | |
parent | 88833ac4aafee4fdba63fb15b17a1f1d9b8a7d37 (diff) | |
download | buildstream-7d10de6152a8078a6018f2dc32537e8bbfc526da.tar.gz |
_casbaseddirectory.py: Use unordered dict for the index
There is no reason for using an ordered dict for the index. This
improves descend() performance by about 20%.
-rw-r--r-- | buildstream/storage/_casbaseddirectory.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py index 90734eb7d..e6147c0be 100644 --- a/buildstream/storage/_casbaseddirectory.py +++ b/buildstream/storage/_casbaseddirectory.py @@ -27,8 +27,6 @@ addressable storage system. See also: :ref:`sandboxing`. """ -from collections import OrderedDict - import os import stat @@ -259,7 +257,7 @@ class CasBasedDirectory(Directory): self.pb2_directory.ParseFromString(f.read()) self.ref = ref - self.index = OrderedDict() + self.index = {} self.parent = parent self._directory_read = False self._populate_index() |