You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.
Currently our application is single threaded. Probably the heaviest/slowest operation that has nothing to do with graphics is the generation or loading of Chunks (calling ChunkProvider::load_chunk()). This would be a good candidate to transfer to another thread to avoid blocking the render loop.
As @jonas-schievink mentioned, it's probably the easiest and (therefore) best to use to channels to send the "pls-load-this-chunk-pos" to the other thread and the Chunks back to the main thread. The main thread then integrates all new chunks into the world's chunk map and creates the corresponding chunk view (related to #55).
This is also related to #56 as the world must be read by different parts of the program (player physics, WorldView, ...) but we still need to mutate the world at some point. As suggested in the linked issue, we could wrap the world into an RwLock and then be careful to only write lock the world at one specific point such that locking never blocks (maybe?).
The text was updated successfully, but these errors were encountered:
Currently our application is single threaded. Probably the heaviest/slowest operation that has nothing to do with graphics is the generation or loading of
Chunk
s (callingChunkProvider::load_chunk()
). This would be a good candidate to transfer to another thread to avoid blocking the render loop.As @jonas-schievink mentioned, it's probably the easiest and (therefore) best to use to
channel
s to send the "pls-load-this-chunk-pos" to the other thread and theChunk
s back to the main thread. The main thread then integrates all new chunks into the world's chunk map and creates the corresponding chunk view (related to #55).This is also related to #56 as the world must be read by different parts of the program (player physics,
WorldView
, ...) but we still need to mutate the world at some point. As suggested in the linked issue, we could wrap the world into anRwLock
and then be careful to only write lock the world at one specific point such that locking never blocks (maybe?).The text was updated successfully, but these errors were encountered: