summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-26 08:34:33 +0100
committerJürg Billeter <j@bitron.ch>2019-02-26 12:12:46 +0100
commit7fed161b02f62e2f2b58cc0094ed7db1beb80f34 (patch)
treea145337a8ac199d106334fd5b1d73831ebddb131
parentdb28a2edeea9354d892f44aafe4d9e50917a4bfe (diff)
downloadbuildstream-7fed161b02f62e2f2b58cc0094ed7db1beb80f34.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.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py
index cf059e568..122e4d8b9 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
@@ -111,7 +109,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()