aboutsummaryrefslogtreecommitdiff
path: root/zenserver/testing/launch.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-12-07 11:21:41 +0100
committerGitHub <[email protected]>2022-12-07 02:21:41 -0800
commit100c8f966b1c5b2fb190748f0177600562d1c5fe (patch)
treefc85e350dea47330149a1d42eb7a6c7ae0a06111 /zenserver/testing/launch.cpp
parentCache request record/replay (#198) (diff)
downloadzen-100c8f966b1c5b2fb190748f0177600562d1c5fe.tar.xz
zen-100c8f966b1c5b2fb190748f0177600562d1c5fe.zip
optimizations (#200)
* Use direct file read and direct buffer allocation for small IoBuffer materalization * Reduce range of materialized data in CompositeBuffer reading CompressedBuffer header reading often only need a small part and not the whole file * reduce lock contention in IoBuffer::Materialize * Reduce parsing of compressed headers Validate header type at decompression * faster CreateDirectories - start from leaf going up and recurse back * optimized BufferHeader::IsValid * Add ValidateCompressedHeader to use when we don't need the actual compressed data Validate that we always get compressed data in CidStore::AddChunk * changelog
Diffstat (limited to 'zenserver/testing/launch.cpp')
-rw-r--r--zenserver/testing/launch.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/zenserver/testing/launch.cpp b/zenserver/testing/launch.cpp
index 0e46fff94..b26f9e437 100644
--- a/zenserver/testing/launch.cpp
+++ b/zenserver/testing/launch.cpp
@@ -477,7 +477,11 @@ HttpLaunchService::HttpLaunchService(CidStore& Store, const std::filesystem::pat
{
std::filesystem::path FullPath = SandboxDir / FileName;
- CompressedBuffer Compressed = CompressedBuffer::FromCompressed(SharedBuffer(Chunk));
+ IoHash RawHash;
+ uint64_t RawSize;
+ CompressedBuffer Compressed = CompressedBuffer::FromCompressed(SharedBuffer(Chunk), RawHash, RawSize);
+ ZEN_ASSERT(Compressed);
+ ZEN_ASSERT(FileHash == RawHash);
CompositeBuffer CompositeBuffer = Compressed.DecompressToComposite();
std::span<const SharedBuffer> Segments = CompositeBuffer.GetSegments();
std::vector<IoBuffer> Chunks(Segments.size());