zacharied / FFXIV-Plugin-HudManager

10 stars 6 forks source link

Game stutters slightly when sheathing/unsheathing weapon if swaps are enabled #4

Closed thedaryen closed 2 years ago

thedaryen commented 2 years ago

When I enable swaps, whenever I sheathe or unsheathe the weapon, it causes a slight but noticeable performance hiccup on the game. It's consistent, happens every time. At first I thought I was seeing things, but disabling swaps solves the issue immediately, making sheathe and unsheathe fluid again.

This happens even if I don't have any "Weapon Drawn" condition set up on my swaps.

Additional info that might or might not be useful: I run the game at 1440p@165hz (unlocked framerate on system settings) on a RTX 2070, so not a low end system. I use a controller to play. I play with G-sync enabled.

If the behavior cannot be reproduced on other users' end, I can test further with other variables.

Edit after further testing: while playing on my laptop (which doesn't have G-Sync, uses a 60hz panel and can't run XIV above 60fps), the stutter is either less noticeable or just doesn't happen at all, so it seems to be something with high framerate and/or g-sync.

Also, even on my desktop setup, if I'm perfectly still (not moving my character or camera), I can't notice the hiccup. It's almost as if it's some kind of fast camera/animation stutter that only happens while in movement.

zacharied commented 2 years ago

This is very strange, I've always played with "Weapon Drawn" conditions and I've never noticed this. I do play at 60fps, so I'll try to reproduce with unlocked framerate.

thedaryen commented 2 years ago

Especially now that my "In Dialogue" trigger suggestion was implemented, this plugin is a must for me, but the stutter is very annoying so I tested isolating some variables.

Here's a video of the behavior I described: https://youtu.be/Vpz4C-yk4gE

Already tried: Multiple resolutions, G-sync on and off, multiple refresh rates Disabling Simple Tweaks plugin Multiple hotbar and crosshotbar setups, even disabling crosshotbar and controller entirely Turning off Gshade (shift+F3) Stop OneDrive sync and closing the program entirely Fullscreen, Windowed, Borderless Window Turning off target filtering First person view and third person view, multiple levels of Zoom

The behavior is the same regardless. Slight stutter whenever swaps are enabled and I sheathe or unsheathe my weapon. Only noticeable when there's character and camera movement. It's even easier to notice when autorunning on first person, as it feels like the entire camera kind of skips a little bit when you sheathe/unsheathe.

zacharied commented 2 years ago

First of all, thanks for putting in the effort to isolate this issue. Looking at your video I can see why this would be a PITA while playing.

Unfortunately I just cannot reproduce this. I set my resolution to the lowest possible and uncapped the framerate, and set up a basic Weapon Drawn swap. I cannot seem to reproduce the stuttering effect at all.

I guess I'll take some shots in the dark. Would you mind typing /xldev into the chat box, then clicking the "Dalamud" at the top of the screen and selecting "Open log window". When you draw weapon, does the log get spammed or anything like that?

My other hunch would be something to do with reading from the hard disk. Is your Windows installed on an SSD?

thedaryen commented 2 years ago

Went a little bit further down into the rabbit hole and just found out the culprit. Guess what, it's XIVAlexander... I can consistently reproduce the stutter by loading XIVAlexander and it's gone after I unload it. Guess I'll report there, sorry for the trouble.

zacharied commented 2 years ago

Thank god because I honestly had zero clue where to go with this one LOL