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.
  2. Dismiss Notice

Resolved (Solved) Editor - Huge lag when unfocusing and focusing it

Discussion in 'Editor & General Support' started by FiveXGames, Jun 26, 2023.

  1. FiveXGames

    FiveXGames

    Joined:
    Apr 27, 2016
    Posts:
    43
    Hi,

    I'm using Unity 2023.3.1f1 + Windows 10 and when I unfocus the editor and them refocus it, there is a 2s lag every time.

    I'm working with external tools and editor at the same time, and this is extremly annoying, ¿it's normal?

    upload_2023-6-26_13-6-22.png

    Solution: It was the package manager that refresh when the editor retakes focus (No editor fedback about this)
     
    Last edited: Jun 26, 2023
  2. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,051
    Looks like it's spending most time doing file operations. Is that already a deep profile or did you try one to see if it shows more detail of what Unity is doing?

    Just to make sure, did you check the speed of the volume the project is on? Does it have plenty of free space and the performance isn't degraded?

    This is likely an Auto-Refresh of the Asset Database triggered by the refocus. This is only a kludge workaround but you could try turning Auto-Refresh off in Unity's preferences. Then you wouldn't have to wait 2s each time you refocus Unity but only when you refresh manually.
     
    FiveXGames likes this.
  3. FiveXGames

    FiveXGames

    Joined:
    Apr 27, 2016
    Posts:
    43
    Ok, thanks for the deep profiling check tip.

    upload_2023-6-26_13-57-43.png

    It was the package manager, I have it opened in other monitor.

    Anyway I think that it should be some feedback that the package manager is refreshing.

    Many thanks for the help!!