Cache worldHasOxygen as it is called a lot.
ellie-semele opened this issue ยท 5 comments
This method was using 1.98% of the sever thread by itself since every living entity calls it every tick.
For reference mods like AE2 use roughly 5% of the server thread.
For reference here's the modification I made for use on AOF, brings the usage down to 0.01% which I think is as good as spark can measure:
https://github.com/Ellemes/Ad-Astra-Fabric/commit/f66fbabc68bbab216109f85f63995e476860f831
We already have the code written for this in a later devjar, will likely be released in the next update.
Thanks for bringing this up. I did not realize the method was that costly. I did some profiling yesterday and managed to improve the performance significantly.
https://spark.lucko.me/DB74vaBa0b
https://spark.lucko.me/iiJMHHntRF