NoClippy icon indicating copy to clipboard operation
NoClippy copied to clipboard

Brief freeze at the end of encounter on WINE

Open Uragawa opened this issue 1 year ago • 9 comments

I noticed this experimenting with the code locally after the latest Dalamud update, but just confirmed that it happens in the official version. It has been tested with no other plugins enabled. There's a good chance this issue doesn't affect Windows users, and the problem is all but certain to originate upstream, but for the time being this is reliably causing a brief freeze at the end of every encounter (unless you don't use actions on the enemy at all). It doesn't seem to scale with encounter duration. These are shown in the Dalamud log:

2023-10-05 21:39:29.537 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 489.8426ms > 50ms - check in the plugin stats window.
2023-10-05 21:41:46.048 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 269.0844ms > 50ms - check in the plugin stats window.
2023-10-05 21:49:58.297 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 331.1141ms > 50ms - check in the plugin stats window.
2023-10-05 21:52:44.592 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 574.4648ms > 50ms - check in the plugin stats window.
2023-10-05 21:53:14.920 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 298.9962ms > 50ms - check in the plugin stats window.
2023-10-05 21:56:41.421 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 393.5624ms > 50ms - check in the plugin stats window.
2023-10-05 22:01:41.565 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 571.0313ms > 50ms - check in the plugin stats window.
2023-10-05 22:02:25.349 -03:00 [WRN] [HITCH] Long FrameworkUpdate detected, 516.7646ms > 50ms - check in the plugin stats window.

It should be noted that this is all on HDD; I can't say whether it's noticeable on SSD.

Uragawa avatar Oct 06 '23 01:10 Uragawa

I am having the same issue. I am on Windows and have an SSD. This reproduces in the overworld as well; if you pull a mob and kill it, leaving combat, the hitch occurs. If you pull two mobs and kill one, the hitch doesn't occur. If you later kill the second, it occurs.

I was able to reproduce this with every other plugin disabled on a fresh /xlrestart.

grantwwu avatar Oct 07 '23 01:10 grantwwu

For both commenters, I also experiencing this problem, @grantwwu are you using DXVK in your Windows?

I ask because my friend uses NoClippy but has no problem, maybe its something with Vulkan only?

weeviltime avatar Oct 12 '23 17:10 weeviltime

I'm not using DXVK as far as I'm aware

grantwwu avatar Oct 12 '23 18:10 grantwwu

On Linux, the suspected culprit is sqlite, which has been introduced into the serialisation flow as of v9. I've been running a self-edited version of NoClippy without the serialisation call in the middle of the update cycle and that solves the problem for me, though it likely kills long-term statistics. I'm also experiencing slowdowns (sometimes hitches, but mostly violent fps drops) in certain parts of the plugin installer which are most likely calling serialisation as well.

Uragawa avatar Oct 15 '23 11:10 Uragawa

Thanks @Uragawa, I'll try the same on my side and recompile without those serializations.

weeviltime avatar Oct 16 '23 19:10 weeviltime

On Linux, the suspected culprit is sqlite, which has been introduced into the serialisation flow as of v9. I've been running a self-edited version of NoClippy without the serialisation call in the middle of the update cycle and that solves the problem for me, though it likely kills long-term statistics. I'm also experiencing slowdowns (sometimes hitches, but mostly violent fps drops) in certain parts of the plugin installer which are most likely calling serialisation as well.

Is the introduction of sqlite Linux specific?

grantwwu avatar Oct 17 '23 03:10 grantwwu

Is the introduction of sqlite Linux specific?

Nope, it's general. Apparently there have been other reports of performance issues on Linux following the change though.

Uragawa avatar Oct 17 '23 04:10 Uragawa

Reporting that this is unfortunately not fixed upstream as of the current incarnation of API 10, please give affected users a way to skip that write or move it out of the framework update loop if that's a possibility.

Uragawa avatar Jul 03 '24 22:07 Uragawa

I've gone ahead and changed it to only save while changing areas. I know its not exactly a real solution, but I'd prefer if Dalamud would fix this or provide an alternative for developers to use to avoid the problem. However, I am open to revisiting this in the future if it is still bothering people and Dalamud can't/won't fix it.

UnknownX7 avatar Jul 04 '24 20:07 UnknownX7