melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.27k stars 542 forks source link

Noticeable Lag While Saving #477

Closed JMC47 closed 3 years ago

JMC47 commented 5 years ago

It appears that melonDS does not asynchronously write savefiles, as whenever games like Mario Kart DS save a ghost file, my framerate drops tremendously. The issue disappears if I move the game/save to a solidstate harddrive.

Other emulators have asynchronous flushing to file to prevent issues like this.

Arisotura commented 5 years ago

good point

nathanielcwm commented 5 years ago

It's noticeable in Ace Attorney as well

Zettymaster commented 5 years ago

Noticable in Pokémon Platinum as well, very pronounced sound lag, FPS drop from 60 to ~45. i am on a SSD

RSDuck commented 5 years ago

for some games like 4th gen Pokemon games you have to keep in mind that it taxes the CPU more than usually during saving, because it does encryption and what not on the save file. For some reason that's not the case for 5th gen Pokemon games, I guess they've optimised it at that point (it's also far quicker).

Liger0 commented 4 years ago

It also slows down on 5th gen, although less.

ichee commented 4 years ago

62e3f41 seems to fix this issue, though I don't have all reported games to test with.

Castlevania Dawn of Sorrow was affected as well, but not after this commit.

RSDuck commented 4 years ago

https://github.com/Arisotura/melonDS/commit/62e3f41f20866388287329218810d2fd8cea3515 still didn't really fix it (as the IO operations are still completely synchronous), though I'm happy to hear that this change atleast alleviated the problem.

RSDuck commented 3 years ago

fixed with https://github.com/Arisotura/melonDS/pull/925