rafaelvcaetano / melonDS-android

Android port of melonDS
GNU General Public License v3.0
768 stars 47 forks source link

Lag on S22 Ultra #1088

Open UnveilingCoyote opened 1 year ago

UnveilingCoyote commented 1 year ago

Emulator starts lagging minutes after starting a game

Littlemac123 commented 1 year ago

Can you document what games you been trying to play, or if you have the DS BIOS, or the dsi mode

UnveilingCoyote commented 1 year ago

When will the lag be fixed

rafaelvcaetano commented 1 year ago

With this information, there's nothing I can do. And the S22 is more than capable of running the emulator without issue. Make sure JIT is enabled in the "System" section in the settings. You can also try disabling sustained performance mode in the "General" section in the settings.

UnveilingCoyote commented 1 year ago

When I play I get bad stuttering throughout, it won't stay at a constant 60fps affects new super mario Bros. Namco Museum DS, and Super mario 64 ds

ghost commented 1 year ago

Hopefully in the future melonds software rendering will improve the performance. Screenshot_20230219_081655

ghost commented 1 year ago

Here's some adb log

Entered adb shell
Success! ※\(^o^)/※
--------- beginning of system
--------- beginning of crash
--------- beginning of main
02-19 11:15:00.410 19260 19260 E AndroidRuntime: FATAL EXCEPTION: main
02-19 11:15:00.410 19260 19260 E AndroidRuntime: Process: me.magnum.melonds, PID: 19260
02-19 11:15:00.410 19260 19260 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 67108880 byte allocation with 25165824 free bytes and 28MB until OOM, target footprint 263838400, growth limit 268435456
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at la.c.a(Unknown Source:0)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at na.a.<init>(Unknown Source:18)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at la.j.<init>(Unknown Source:49)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at la.j.<init>(Unknown Source:4)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at la.j.<init>(Unknown Source:1)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at org.apache.commons.compress.archivers.sevenz.j.b(Unknown Source:12)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at org.apache.commons.compress.archivers.sevenz.g.a(Unknown Source:18)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at org.apache.commons.compress.archivers.sevenz.n.i(Unknown Source:89)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at org.apache.commons.compress.archivers.sevenz.n.G0(Unknown Source:40)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at org.apache.commons.compress.archivers.sevenz.n.j(Unknown Source:71)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at org.apache.commons.compress.archivers.sevenz.n.P(Unknown Source:43)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at f8.f.k(Unknown Source:0)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at f8.f.i(Unknown Source:22)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at f8.b.h(Unknown Source:38)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at f8.b.d(Unknown Source:6)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at t8.b0.g(Unknown Source:61)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at t8.b0.h(Unknown Source:11)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at t8.b0.b(Unknown Source:0)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at t8.b0$b.l(Unknown Source:37)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at e7.a.q(Unknown Source:11)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at u7.x0.run(Unknown Source:88)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at kotlinx.coroutines.internal.j.run(Unknown Source:12)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at kotlinx.coroutines.scheduling.k.run(Unknown Source:2)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at kotlinx.coroutines.scheduling.a.E(Unknown Source:0)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at kotlinx.coroutines.scheduling.a$c.d(Unknown Source:14)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at kotlinx.coroutines.scheduling.a$c.n(Unknown Source:28)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    at kotlinx.coroutines.scheduling.a$c.run(Unknown Source:0)
02-19 11:15:00.410 19260 19260 E AndroidRuntime:    Suppressed: u7.v0: [k2{Cancelling}@b580f69, Dispatchers.Main.immediate]
LuanVSO commented 1 year ago

I'm on s20+ exynos and i am also seeing the slow down after a few minutes of play, i have installed a DS and DSi bios, DSi mode is turned off, JIT is turned on. I see it happen on Castlevania dawn of sorrow and on the DSi firmware. If I pause and unpause the emulation it returns to normal levels of performance for some time. Tested turning off treaded rendering to no effect.

UnveilingCoyote commented 1 year ago

Any update on this?

ghost commented 1 year ago

Any update on this?

Performance of this emulator will only improve if ever opengl renderer is implemented.

UnveilingCoyote commented 1 year ago

When will this issue be fixed

rafaelvcaetano commented 1 year ago

I don't have that specific device to be able to reproduce your problem. The closest thing I have is a Galaxy S10 and it doesn't suffer from the same problem. As such, you will have to be patient because addressing these things is not easy.

UnveilingCoyote commented 1 year ago

Thank you Rafael for responding, I will wait.

LuanVSO commented 1 year ago

You can test apps on Samsung devices here for free: https://developer.samsung.com/remote-test-lab

ghost commented 1 year ago

@rafaelvcaetano JIT doesn't work on my vivo y11 snapdragon 439 performance. I tried it disable/enable the fps doesn't change but the threaded rendering really helps.

Does JIT only optimize in higher specs devices?

ghost commented 1 year ago

Performance is solid on 64 bit devices with thread rendering and JIT enabled, and should run at full speed on flagship devices. Performance on older devices, specially 32 bit devices, is very poor due to the lack of JIT support.

Maybe melonDS detected my phone as 32bit? What do you think about this?

But in DevCheck app my phone is 64bit supported. Screenshot_20230315_203553

LuanVSO commented 1 year ago

@rafaelvcaetano JIT doesn't work on my vivo y11 snapdragon 439 performance. I tried it disable/enable the fps doesn't change but the threaded rendering really helps.

Does JIT only optimize in higher specs devices?

Please open another issue

UnveilingCoyote commented 1 year ago

It still slows down after a few minutes, please fix this

UnveilingCoyote commented 1 year ago

Update on this?

LuanVSO commented 1 year ago

Could you stop pinging this thread? Everyone who is subscribed receives notifications when you do that. Besides that, annoying people will not get them any more inclined to fix this, especially because he has no obligation to do it

UnveilingCoyote commented 1 year ago

Jeez, I didn't expect this kind of answer, I am sorry