mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-21 22:38:41 -06:00
only save modified chunks
This commit is contained in:
parent
61b99409ce
commit
64a67d0ffe
|
@ -287,11 +287,14 @@ fn process_state_changes(
|
||||||
|
|
||||||
if let Some(io) = &io {
|
if let Some(io) = &io {
|
||||||
if let Some(block_data) = &chunk.block_data {
|
if let Some(block_data) = &chunk.block_data {
|
||||||
// log::debug!("issue save command");
|
// Only save the chunk if it has been modified
|
||||||
io.send(IOCommand::SaveChunk {
|
if chunk.data_modified {
|
||||||
position,
|
// log::debug!("issue save command");
|
||||||
data: block_data.blocks.clone(),
|
io.send(IOCommand::SaveChunk {
|
||||||
});
|
position,
|
||||||
|
data: block_data.blocks.clone(),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue