diff options
| author | Dan Engelbrecht <[email protected]> | 2024-04-30 10:11:25 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-04-30 10:11:25 +0200 |
| commit | c7a0ddf9f26fdd647574e4031a66362234298e7a (patch) | |
| tree | 5e3eba1856dc160ca0beb2bc5edaf1ea490a0a6f /src/zenstore/cas.cpp | |
| parent | miscellaneous minor bugfixes (#66) (diff) | |
| download | zen-c7a0ddf9f26fdd647574e4031a66362234298e7a.tar.xz zen-c7a0ddf9f26fdd647574e4031a66362234298e7a.zip | |
fix get project files loop (#68)
- Bugfix: Remove extra loop causing GetProjectFiles for project store to find all chunks once for each chunk found
- Bugfix: Don't capture ChunkIndex variable in CasImpl::IterateChunks by reference as it causes crash
- Improvement: Make FileCasStrategy::IterateChunks (optionally) multithreaded (improves GetProjectFiles performance)
Diffstat (limited to 'src/zenstore/cas.cpp')
| -rw-r--r-- | src/zenstore/cas.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/zenstore/cas.cpp b/src/zenstore/cas.cpp index 45d7dd277..67790e2c6 100644 --- a/src/zenstore/cas.cpp +++ b/src/zenstore/cas.cpp @@ -430,11 +430,14 @@ CasImpl::IterateChunks(std::span<IoHash> DecompressedIds, { return false; } - if (!m_LargeStrategy.IterateChunks(DecompressedIds, [&](size_t Index, const IoBuffer& Payload) { - IoBuffer Chunk(Payload); - Chunk.SetContentType(ZenContentType::kCompressedBinary); - return AsyncCallback(Index, Payload); - })) + if (!m_LargeStrategy.IterateChunks( + DecompressedIds, + [&](size_t Index, const IoBuffer& Payload) { + IoBuffer Chunk(Payload); + Chunk.SetContentType(ZenContentType::kCompressedBinary); + return AsyncCallback(Index, Payload); + }, + OptionalWorkerPool)) { return false; } |