mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-13 14:27:30 -04:00
We can reserve chunk memory upfront
This commit is contained in:
parent
26056b726d
commit
ade7116484
@ -757,6 +757,7 @@ void scanner_<LoggerPolicy>::scan(
|
||||
|
||||
// TODO: we should be able to start this once all blocks have been
|
||||
// submitted for compression
|
||||
mv2.chunks().value().reserve(prog.chunk_count);
|
||||
im.for_each_inode_in_order([&](std::shared_ptr<inode> const& ino) {
|
||||
DWARFS_NOTHROW(mv2.chunk_table()->at(ino->num())) = mv2.chunks()->size();
|
||||
ino->append_chunks_to(mv2.chunks().value());
|
||||
|
Loading…
x
Reference in New Issue
Block a user