This episode is split into two parts, and most of this was prototyped in my mcpy-accelerated repo:
EP13a: General cleanup (done by #107 and #108).
EP13b: Performance improvements (in terms of loading time).
EP13c: Performance improvements (in terms of frame time).
This PR focuses on the performance part. This is what needs to be done:
[x] Attach profiler (in practice, ~comment it out in this repo~ no need and ~add it as a dev dependency in pyproject.toml~ cProfile comes with Python).
[x] Set up buildsystem with Poetry's unstablebuild.py (but looks stable enough for me).
[x] Speed up chunk generation (cythonize, C code for the really sensitive bits).
[x] Do save chunk caching (as nbtlib is now dominantly slow vs. chunk mesh generation).
[x] Load chunks progressively (now that they can be generated in less than a frame's time).
[x] ~Improve performance of entities (colliders (?) and physics engine). In practice that just means the player at the moment, even though mcpy-accelerated also does this for non-player entities (mobs).~ EP13c (TODO link to PR).
[x] CI workflow to make sure all our Cython modules are building correctly.
[x] ~Investigate if this can be integrated and closed: #96.~ Won't make a difference.
[x] DON'T FORGET TO UPDATE CODE TO RE-LOAD FROM NBT IF THERE ARE CHUNK FILE CHANGES!
[x] ~GLM.~ EP13c (TODO link to PR).
All of this still needs to be done for community, but I'll probably do that last minute before releasing EP13b.
This episode is split into two parts, and most of this was prototyped in my
mcpy-accelerated
repo:This PR focuses on the performance part. This is what needs to be done:
pyproject.toml
~cProfile
comes with Python).build.py
(but looks stable enough for me).nbtlib
is now dominantly slow vs. chunk mesh generation).mcpy-accelerated
also does this for non-player entities (mobs).~ EP13c (TODO link to PR).All of this still needs to be done for
community
, but I'll probably do that last minute before releasing EP13b.