Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Editor lag spikes in play mode as well as when pressing button (With screens and video)

Discussion in 'Editor & General Support' started by UFODriverr, Feb 18, 2023.

  1. UFODriverr


    Nov 20, 2014
    Motherboard: Z390-A PRO
    CPU: Intel Core i9-9900K 8 cores 4.7 GHz
    RAM: 32 gb
    Video: Nvidia RTX 3080

    Similar but not the same as:

    So i already was posting about it and found a work around. But now i decided to try get to the bottom of the issue or at least report it in a hope thet any Unity dev sees it =)
    So for some reason there is overall some lag spikes in editor but on top of that any keypresses will cause overhead in editor. And not a small one (Editor can drop to 30-40 fps).
    Hovering over windows will cause same BUT its not an issue because it happens in 1 frame and only when you debug or not in play mode, but i still decided to include it here

    Lag spikes in editor with out doing anything:
    Lag spikes when doing described things, Video :

    Please note that in this test there is no actual game running. It's an empty project. In a real project, you actually have your 30ms (or whatever) spend on the game. If another delay kicks in just for editor keystroke processing, this gets unplayable quickly. (In this case its 12-20 ms). Especially if you working with physics or in VR, it become jittery.

    • Create new URP project with Unity 2022.2.5f1
    • Open SampleScene
    • Open from main menu "Window > Analysis > Profiler"
    • Switch Profiler to Editor mode and start recording
    • Press Play
    • Hover over any new window (eg move mouse from window to window) and observe performance in Profiler
    • Press any keyboard key and observe performance in Profiler

    Pressing any keyboard keys and on each Down/Up cause a huge performance drop.

    No performance drop.
    Last edited: Feb 18, 2023
  2. UFODriverr


    Nov 20, 2014
    So i don't know if i fixed it. But for now. I Defaulted NVidia settings and well. It now works fine… I don't know what i did to fix it but it look fixed -_-”