The codehandler writes then icbi's (cache invalidates) for each code every frame, and if you have too many codes this will cause lag. Oddly, this lag will sometimes only appears for a few frames every 10-20 seconds. My fix checks many of the write instructions to see if they are redundant and can be skipped, along with skipping the icbi too. This means many codes will never need to write/icbi more than once, and thus no more lag.
I have very little knowledge of how to correctly build codehandler.bin on windows, so I had to edit the output binary by hand to make it work. It seems to work fine though, but a proper build of it would be nice.
Finally, I don't know when exactly icbi needs to be used and if dcbf ever needs to be used. If someone more knowledgeable would like to discuss that.
If you try it and something breaks, post the gecko code you used with it. To use it, just place codehandler.bin in the dolphin /sys/ folder (backup the existing one). You can ignore the other files in the 7z.
/edit It was built into dolphin. No more need to share it here.
I have very little knowledge of how to correctly build codehandler.bin on windows, so I had to edit the output binary by hand to make it work. It seems to work fine though, but a proper build of it would be nice.
Finally, I don't know when exactly icbi needs to be used and if dcbf ever needs to be used. If someone more knowledgeable would like to discuss that.
If you try it and something breaks, post the gecko code you used with it. To use it, just place codehandler.bin in the dolphin /sys/ folder (backup the existing one). You can ignore the other files in the 7z.
/edit It was built into dolphin. No more need to share it here.