Amulet-Core icon indicating copy to clipboard operation
Amulet-Core copied to clipboard

Rewritten the Java region class

Open gentlegiantJGC opened this issue 2 years ago • 0 comments

The main aim of this refactor is to reduce the amount of data that is held in memory.

The previous implementation loaded and wrote the whole region file meaning all the data had to be in memory. The new implementation removes the buffer and directly reads and writes to the file on disk removing any need for a buffer of the data. A second class has been implemented extending the first with a buffer to emulate the old behaviour. This is only temporary to keep backwards compatibility and will be depreciated and removed in the future. Ideally where possible the format wrappers should just be a view into the real data and should not implement any form of buffering.

gentlegiantJGC avatar Apr 24 '22 16:04 gentlegiantJGC