BLaZeKiLL / VloxyEngine

Performance oriented voxel engine for unity.
MIT License
99 stars 9 forks source link

Priority scheduler #96

Closed BLaZeKiLL closed 1 year ago

BLaZeKiLL commented 1 year ago

Completely re-wrote the scheduler, it is much more simple more robust now. at its core, it uses priority queues to claim and reclaim chunks. so now we have 2 queues for chunk data and 2 queues for chunk meshes, so 4 in total.

I also changed how data is accessed in the jobs and now all jobs work on their own respective slices of data, this allows us to schedule chunk data and chunk mesh jobs together which improves performance, also the main chunk store doesn't need to be a native-hash-map anymore we just compute a native slice of what a job requires as it is getting scheduled.

I don't feel there is any big performance impact of the new scheduler when compared to the old one, but it may use more memory.

should fix #87 closes #88

BLaZeKiLL commented 1 year ago

This is gonna clutter the git history, hmm I'll add a contributing guide soon. so I myself remember the gitflow of this repo 🤣