Don't send CharacterMoveInputEvent if I don't input anything #4993
Labels
Category: Performance
Requests, Issues and Changes targeting performance
Status: Needs Discussion
Requires help discussing a reported issue or provided PR
Status: Needs Investigation
Requires to be debugged or checked for feasibility, etc.
Topic: Stabilization
Requests, Issues and Changes related to improving stablity and reducing flakyness
Type: Improvement
Request for or addition/enhancement of a feature
Motivation
During a debugging session I noticed, that the
LocalPlayerSystem
sends aCharacterMoveInputEvent
every tick, even if I'm not pressing any key and not moving the mouse at all.See https://github.com/MovingBlocks/Terasology/blob/develop/engine/src/main/java/org/terasology/engine/logic/players/LocalPlayerSystem.java#L175-L176
This does IMO not only create a lot of unnecessary events that might negatively impact, but it also creates a lot of "noise" and makes it harder to debug.
Proposal
Exit early from
LocalPlayerSystem#processInput
if there is no input, e.g. no keyboard input creating movement and no mouse or VR input creating view rotation.My hope would be that this improves performance and reduces unnecessary noise.
The text was updated successfully, but these errors were encountered: