Restructure the chunk meshes to reduce memory usage #1188
Labels
optimization
a performance problem that should be addressed or an optimization idea
refactor
shuffle a lot of code around
Milestone
FaceData currently makes up ~30% of the total memory usage (at render distance 24)
This is really not necessary. The face data is stored twice: Once in a large array, and once in multiple arraylists for types/neighbors/lod neighbors.
I think the optimal behavior would be to only keep these arraylists locally on the stack when creating the mesh. Then they should be merged/added into the big list right away, instead of collecting them in bulk at the end. This will require some more copying, but I think overall it should be better than keeping so many lists of duplicate data.
The text was updated successfully, but these errors were encountered: