This decompression:
|
let received_chunk_data: ChunkData = decode_compressed(&*data); |
and this lock:
|
let mut chunk_data_write = loaded_chunk.data.write().unwrap(); |
currently run in the main thread, which is killing performance (~
6ms for the decompression, and ~1ms for the lock).
These steps need to be moved into the chunk-updating thread(s), which hopefully shouldn't be too difficult.
This decompression:
VoxelGame/sourcecode/chunk/client/src/lib.rs
Line 142 in a6cbe3b
and this lock:
VoxelGame/sourcecode/chunk/client/src/lib.rs
Line 144 in a6cbe3b
currently run in the main thread, which is killing performance (~6ms for the decompression, and ~1ms for the lock).
These steps need to be moved into the chunk-updating thread(s), which hopefully shouldn't be too difficult.