Fix overlay window stutter after focus changes#928
Conversation
|
Hey thanks for the PR! Could you explain the stuttering you were seeing and the type/method of testing that this is gone with this change? I'm not really seeing much stuttering, which is maybe just since I'm on a decent PC but I'll see if i can replicate the performance improvement |
|
Hard to describe precisely: while the app is running, PoE2 feels like it has bad frame pacing / bad 1% lows, but the FPS counters I checked did not show a meaningful drop. My system is a 7800X3D + 9070 XT, so this was not from being GPU/CPU bound. The practical symptom was that Exiled Exchange became unusable during mapping for me: I would normally have to close the app before entering a map and restart it when I wanted to price check. With this patch, that behavior is gone in my manual testing. Testing method was manual A/B testing:
I do not have a synthetic benchmark that captures it well, since average FPS and 1% lows did not reflect the issue for me. My best guess is that this is related to the Windows compositor / transparent always-on-top Electron overlay staying in the presentation path, so it may depend on Windows version, GPU driver, display mode, or focus state. On LLM assistance: I used Codex/GPT-5 as an engineering assistant for codebase discovery, debugging hypotheses, and drafting parts of the patch. I’m a professional software engineer, not submitting this as an unreviewed AI-generated change: I reproduced the issue locally, tested the fix manually in-game, reviewed the final diff, and removed unrelated changes before opening the PR. |
|
Any updates on this? |
|
I'll look at it at some point, I've got other things i'm doing right now though and I don't particularly look forward to reviewing llm generated code tbh |
|
On topic: Off-topic: You asked how much LLM assistance I used and I told you the truth. I could've just not mentioned it and you'd have reviewed a ~100 line diff on its merits. Me being honest is the only reason it's sitting here. It's fine, it's your repo, reject whatever you want. |
|
When using this I can see it gains about 10-20 fps when the game is active, and maybe less stutter when focusing the game from having the overlay active(with respect to no/less fps dip). When trying to price check an item now, there is a flicker/fade in of the UI instead of it just appearing. From reviewing video of with/without the patch(below), it seems like the flicker portion was maybe swapped from the end to the start of price checking. Tried to debug why the flickering moved to the start for an hour or two but couldn't figure it out (following the code flow in overlay window was a pain the last time i looked at it so not super shocking). Personally would prefer the flicker at the end, even though it may effect gameplay more, since it makes the UI feel much snappier to use. With PR: Without PR: |
|
Agree about the flickering... |
c386f60 to
0782a1c
Compare
Summary
electron-overlay-window.--no-overlaywork in dev.Why
The transparent always-on-top Electron overlay can remain visible/click-through above the game after overlay focus changes. This can cause perceived frame pacing stutter even when FPS and 1% lows look fine. Alt-tabbing can temporarily clear it because it forces a fresh Windows focus/compositor transition.
Validation
main:npm run buildmain:npm run lintrenderer:npm run buildrenderer:npm run lint