Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Multiplayer InputSystem is incredibly slow

Discussion in 'Input System' started by KAJed, Apr 1, 2021.

  1. KAJed

    KAJed

    Joined:
    Mar 15, 2013
    Posts:
    122
    This statement primarily applies to some of the consoles (which will remain nameless) but having up to say 8 users becomes untenable. InputManager.FireStateChangeNotifications with 8 players configured (and no other action sets enabled) takes too long. Obviously 8 players is a lot but certainly not unheard of for local multiplayer.

    Now, in this particular case it seems as though the InputSystem is ticking this particular function twice, but even then input is taking too long per call. The current test case for this is an action bound to a gamepad stick. I am binding all 8 players to the same controller so that they all respond as if they had their own.

    This timing seems to increase pretty linearly with the number of players, so reducing the players to a reasonable 4 still has issues.

    Are these major performance issues currently known?

    For clarity sake: one of the main issues is that creating copies of whatever input class you have and enabling it will cause every event to be processed by each rather than being grouped and processed once for the devices it supports. We are investigating putting very hard limits on what devices are bound to any use (including the input module)
     
    Last edited: Apr 1, 2021