From 4cb1b4b409c4067c669fedef4a02be27689e3d26 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 3 Jan 2020 18:03:35 +0000 Subject: 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 --- scripts/gen-lockedsig-cache | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'scripts') 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() sstate_content_cache = {} for s in sigs: prefix = s[:2] + prefix2 = s[2:4] if prefix not in sstate_content_cache: sstate_content_cache[prefix] = build_sha_cache(prefix) - - for f in sstate_content_cache[prefix][s]: - files.add(f) + if prefix2 not in sstate_content_cache[prefix]: + sstate_content_cache[prefix][prefix2] = build_sha_cache(prefix + "/" + prefix2) + + if s in sstate_content_cache[prefix]: + for f in sstate_content_cache[prefix][s]: + files.add(f) + if s in sstate_content_cache[prefix][prefix2]: + for f in sstate_content_cache[prefix][prefix2][s]: + files.add(f) elapsed = time.perf_counter() - start_time print("Gathering file list took %.1fs" % elapsed) -- cgit v1.2.3-54-g00ecf