This (small) PR implements LZ4 compression of the undo buffers.
LZ4 compression/decompression is very fast, and with the drawings I tested, achieves a compression down to 1.5-2.5% of the original buffer. Hence, this allows for a very deep undo buffer without significant memory penalty.
I have fixed it at 100 which for practical purposes is unlimited.
The entire logic of the undo system remains unaltered.
The only difference is that swap_surface includes a compression/decompression step.
The undo buffers are only allocated once they are needed, and they are successively grown when this is necessary.
This (small) PR implements LZ4 compression of the undo buffers.
LZ4 compression/decompression is very fast, and with the drawings I tested, achieves a compression down to 1.5-2.5% of the original buffer. Hence, this allows for a very deep undo buffer without significant memory penalty. I have fixed it at 100 which for practical purposes is unlimited.
The entire logic of the undo system remains unaltered.
The only difference is that
swap_surface
includes a compression/decompression step.The undo buffers are only allocated once they are needed, and they are successively grown when this is necessary.