Fix ring buffer.
Optimize undo proxy. Less memory usage by undo stack (~50%).
Dont count invalid instructions in emulationstats.d
Add empty undo frame compression. Decreases memory usage by another 10%.