diff options
author | 2016-07-20 19:06:20 +0000 | |
---|---|---|
committer | 2016-07-20 19:54:37 +0000 | |
commit | 2e1dbd79ae73753a7a14ddc991fa0b374bbf8605 (patch) | |
tree | c48764f6a07324664b67473ce376f221347fa3bd /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | |
parent | ebf601d340c570d2666a1293a144975938a063f2 (diff) |
Use byte[] rather than ByteString for file digests.
ActionInputFileCache:
Change getDigest() to return the underlying byte[16] owned by each
FileArtifactValue.
Remove throws clause from getInputFromDigest(); this should be an
in-memory operation, and no implementation actually throws.
PerActionFileCache:
Invert mapping from artifact to digest only if needed. Remove interner,
as it was used only for the reverse map keys, not the returned values.
This should be a significant cpu savings as eagerly constructing the
reverse maps was a noticeable hotspot.
--
MOS_MIGRATED_REVID=127972359
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java index a9cf5833f1..b5c0863d98 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java @@ -1105,8 +1105,8 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto } @Override - public ByteString getDigest(ActionInput actionInput) throws IOException { - ByteString digest = perActionCache.getDigest(actionInput); + public byte[] getDigest(ActionInput actionInput) throws IOException { + byte[] digest = perActionCache.getDigest(actionInput); return digest != null ? digest : perBuildFileCache.getDigest(actionInput); } @@ -1130,7 +1130,7 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto @Nullable @Override - public ActionInput getInputFromDigest(ByteString digest) throws IOException { + public ActionInput getInputFromDigest(ByteString digest) { ActionInput file = perActionCache.getInputFromDigest(digest); return file != null ? file : perBuildFileCache.getInputFromDigest(digest); } |