Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heavy input lag in editor while running the game #41495

Closed
mphe opened this issue Aug 24, 2020 · 10 comments
Closed

Heavy input lag in editor while running the game #41495

mphe opened this issue Aug 24, 2020 · 10 comments

Comments

@mphe
Copy link
Contributor

mphe commented Aug 24, 2020

Godot version:
Godot 3.2.2.stable.official with GLES3

OS/device including version:

  • Arch Linux with kernel 5.8.3-arch1-1
  • Intel Core i5-3210M
  • Intel HD Graphics 4000
  • Acer Aspire E1-571G

Issue description:
I'm experiencing heavy input lag in the editor when running my game. It takes up to 10 seconds until the editor responds to any input, which makes it completely unusable. Especially debugging is just not possible with this bug. This happens in a 2D project, I haven't tested 3D so far.
Neither --verbose nor continous UI updates fixed this problem.
It happens with both, the xf86-video-intel and modesetting driver, independent of compositor, window manager, and desktop environment.
All drivers are up-to-date.
Godot is the only application/game that has this kind of problem.

It seems to be somewhat related to ingame performance. I noticed in my project, as long as the game runs above 60 FPS, the editor has about 1 second input lag. If it drops below, I get the mentioned ~10s. This happens with both Vsync on and off.

Not sure if it's related, but I also experience heavy performance degradations when using post processing shaders (using SCREEN_TEXTURE), even if the shader does nothing, which is the reason why the game drops below 60 FPS in the first place.
If I hide the respective object, performance goes up and input lag down.

On the other hand, in the attached example project, I get about 120 FPS, but ~3s of input lag, and only if Vsync is off.

It sounds similar to various other issues that were closed as duplicates of #23069, but as suggested I opened a new issue here.

Steps to reproduce:
Run the attached project and observe input lag in editor. This should yield ~3s of input lag in the editor.

Minimal reproduction project:
Not sure if this is actually minimal, but it is consistently reproducable for me.
I placed a few sprites, added an empty post processing shader and an Environment with Glow enabled.
perftest.zip

@Zireael07
Copy link
Contributor

I can add that I am experiencing the same issue on Manjaro Linux, Intel Kaby Lake, KDE.
I didn't report because I thought it was something in my 3D project, as I wasn't experiencing it in the 2D project (or at least not to a degree I would notice, I thought it was remote tree affecting things).
This input lag also affects the 'stop' button in editor, to the degree that it's faster to close the running game via the X in the corner than by the stop button.

@Calinou
Copy link
Member

Calinou commented Aug 25, 2020

@mphe @Zireael07 Can you reproduce this with any older Godot versions (specifically 3.2.1)? Here's hoping #36052 didn't cause a regression…

@Zireael07
Copy link
Contributor

That would be difficult to check, as it depends on the game performance so an empty project won't help, and all my projects use 3.2.2. so I don't think they'd be safe to open in 3.2.1.

@Calinou
Copy link
Member

Calinou commented Aug 25, 2020

and all my projects use 3.2.2. so I don't think they'd be safe to open in 3.2.1.

With version control in place, that shouldn't be an issue 🙂

@schneiderl
Copy link

I've just downloaded Godot 3.2.2 so I've no big projects running and the input lag is already a problem.

I'm running it on Windows with an i5-8350U CPU. Can my CPU be the problem here?
On the task manager, Godot does not seem to be using much processing power so I'm unsure what could be causing the issue.

@schneiderl
Copy link

@Calinou I've just tested with Godot 3.2.1 and the input lag is almost non-existent.
My guess is that, as you said, #36052 might have had some impact on this.

@Calinou
Copy link
Member

Calinou commented Aug 25, 2020

@schneiderl Just to make sure, can you also test 3.2.2rc3 and 3.2.2rc4? The former doesn't include the PR, but the latter does.

Also, does the problem go away if you enable Update Continuously in the Editor Settings? Does it go away if you leave it disabled but increase Low Processor Mode Sleep Usec to a value like 30000?

@mphe
Copy link
Contributor Author

mphe commented Aug 25, 2020

@Calinou I can still reproduce the issue with the attached example in all three mentioned builds. Update Continuously and higher Low Processor Mode Sleep Usec make no difference.

@schneiderl
Copy link

@Calinou I must say that even using 3.2.2 stable the problem went away completely by enabling Update Continuously.
When using 3.2.1 it still felt a bit laggy but after ticking this flag it is as smooth as it could be.

@akien-mga
Copy link
Member

Seems to be a duplicate of #28333.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants