valence/valence_protocol
Ryan Johnson 740778ec41
Update chunk data packet cache lazily (#170)
Previously, the chunk data cache was regenerated at the end of each tick
every time a block or biome was modified in a chunk. This causes
performance problems in situations where chunks are being modified every
tick, like the conway example or redstone machines.

This changes things so that the chunk data packet is regenerated only
when a client actually needs to load the chunk. This isn't perfect
because the regeneration cannot happen in parallel, but the benefits
outweigh the costs. (The chunk data packet _is_ generated in parallel
when the chunk is first created. There is also some parallelism when
clients are loading different chunks. The packet cache is guarded by a
`Mutex`.)

This has revealed that compression is surprisingly slow. This should be
investigated later.
2022-12-13 22:56:22 -08:00
..
build Translation key extractor and code generator (#160) 2022-11-27 05:12:08 -08:00
src Update chunk data packet cache lazily (#170) 2022-12-13 22:56:22 -08:00
Cargo.toml Move protocol code to valence_protocol + redesigns (#153) 2022-11-13 06:10:42 -08:00