summaryrefslogtreecommitdiffstats
path: root/scripts/gen-lockedsig-cache
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-03 18:03:35 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-06 23:54:39 +0000
commit4cb1b4b409c4067c669fedef4a02be27689e3d26 (patch)
tree9135b86ff641ae20763fda2a523b727cd12a8a59 /scripts/gen-lockedsig-cache
parentfd8d01134aaacb62ce344393fa2f3950c00ef6fc (diff)
downloadpoky-4cb1b4b409c4067c669fedef4a02be27689e3d26.tar.gz
sstate: Add extra directory level
We're having speed issues on the autobuilder due to the numbers of files in sstate directories. We previously split these by the first two characters of the hash. This change extends this to split by the next two characters as well, creating more layers of directories. This should signifiantly speed up eSDK builds on the autobuilder as the current sstate layout simply isn't scaling there but addresses a general complaint. gen-lockedsig-cache needed to be updated for the new split level sstate. Also update tests for new layout. (From OE-Core rev: d05bde16bdad761ed8f4c0a48de60c649aa33e85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/gen-lockedsig-cache')
-rwxr-xr-xscripts/gen-lockedsig-cache13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 9bfae9d832..6a7d285910 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -78,11 +78,18 @@ files = set()
78sstate_content_cache = {} 78sstate_content_cache = {}
79for s in sigs: 79for s in sigs:
80 prefix = s[:2] 80 prefix = s[:2]
81 prefix2 = s[2:4]
81 if prefix not in sstate_content_cache: 82 if prefix not in sstate_content_cache:
82 sstate_content_cache[prefix] = build_sha_cache(prefix) 83 sstate_content_cache[prefix] = build_sha_cache(prefix)
83 84 if prefix2 not in sstate_content_cache[prefix]:
84 for f in sstate_content_cache[prefix][s]: 85 sstate_content_cache[prefix][prefix2] = build_sha_cache(prefix + "/" + prefix2)
85 files.add(f) 86
87 if s in sstate_content_cache[prefix]:
88 for f in sstate_content_cache[prefix][s]:
89 files.add(f)
90 if s in sstate_content_cache[prefix][prefix2]:
91 for f in sstate_content_cache[prefix][prefix2][s]:
92 files.add(f)
86 93
87elapsed = time.perf_counter() - start_time 94elapsed = time.perf_counter() - start_time
88print("Gathering file list took %.1fs" % elapsed) 95print("Gathering file list took %.1fs" % elapsed)