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 What wrong with GarbageCollectAssetsProfile on my Editor

Discussion in 'Editor & General Support' started by thanghp456, Nov 3, 2022.

  1. thanghp456

    thanghp456

    Joined:
    Feb 12, 2017
    Posts:
    4
    Hi everyone, I'm using Mac M1 Pro and Unity 2021.3.1f. When I first open Unity it runs smoothly but when I go into game mode for a while and exit game mode, the GarbageCollectAssetsProfile causes my editor to drop framerate.Has anyone come across a similar case?

    * I tried other version like unity 2021.3.12f but not fixed
     
  2. lesmatt

    lesmatt

    Joined:
    Apr 11, 2017
    Posts:
    5
    Hi, I see the exact same thing happening on my end. Have you found and resolution?
     
    Last edited: Nov 10, 2022
  3. Wang_Sichun

    Wang_Sichun

    Joined:
    Oct 11, 2016
    Posts:
    2
    It also happened to my editor; now my editor is too slow to use. I even tried with an empty project, it happened again.

    I am using a mac with an intel CPU. Using unity 2021.3.13f1
     
    Last edited: Nov 18, 2022
  4. patrickjarnfelt

    patrickjarnfelt

    Joined:
    Jun 24, 2013
    Posts:
    20
    I am having the same issues on my Mac M1. I have updated to the latest 2021.3.23f1 to no avail.
    The editor performance was horendous before changing the Graphics API for Mac to OpenGLCore (and remove Metal), but the same problem still arises to me that suddently the editor becomes unresponsive because of the "Integrate Assets in Background". My Editor fps even goes down to 15fps till it's almost unusable.
     

    Attached Files:

  5. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    709
    I started experiencing this today. It seemed to happen after upgrading to 2021.3.14f1, but it's still happening after switching back to 2021.3.9f1

    I started using the Visual Effects system today. That's the only thing that should be new here. I suppose it's possible that I just didn't notice until now (figuring that it was just normal lag), but it's really jarring in the scene view.

    It happens a few minutes after starting the editor, and it's quite a major problem! There's no obvious trigger: I started the editor and poked around for a few minutes; it started while panning around a shader graph (which probably isn't the actual cause).

    edit: It's continuing to happen in 2022.1.23f1.

    It's spending a ton of time trying to unload unused assets, judging by the Asset Loading profiler. I'm not observing this in an empty project.

    I watched the profiler when the bug started, and I noticed that it was abruptly loading a bunch of assets: lots of random files from the Library/Artifacts folder. They were a 50-50 mix of Texture2D and "Other" assets.

    Here's a random frame. Every frame has the same assets in it. It seems like it's repeatedly reading a couple dozen files every single frame, producing worse and worse lag over time.

    upload_2022-11-30_20-43-48.png

    Here're the files being read.

    upload_2022-11-30_20-43-42.png

    If I crack open one of these files in the Library/Artifacts folder, I find what looks like texture data, given the result of running strings on one:

    upload_2022-11-30_20-43-35.png

    So far, all of these appear to have been editor icons -- this one is for InputActions, another was for PuppetMaster (a component from the package of the same name), a third was for "NavMeshSurface Icon", another was "TMP - Dropdown Icon", and so on and so forth.

    All of these happen to be from packages.

    Deleting random stuff from my scene tends to reduce the number of files being read and assets being loaded, but it doesn't change the amount of time spent trying to unload assets.

    That all seems interesting. Perhaps other people having this issue could check that? In 2022, at least, you have to enable the File Access and Asset Loading profilers in the Profiler window.

    edit, again: Now I'm seeing the lag happen without any assets getting loaded. It's pretty hard to pin down.

    It does seem like deleting the Library folder is helping with this, though. I did that and I haven't noticed any slowdown after doing a fair bit of work.

    edit, a third time: If I turn off gizmos, then the files stop getting read every frame, and the assets stop getting loaded every frame. These files correspond to visible gizmos -- if I delete a component on an object so that a different gizmo appears, the editor starts loading that file every frame.

    However, this has no effect on the lag. Switching between debug and release mode does seem to "reset" the problem, though (although it always comes back pretty quickly)

    A bit of a long-shot idea here...but did y'all upgrade to macOS 13 (Ventura) before this problem started? I updated my system a few days ago, and I wonder if there's a relationship...
     
    Last edited: Dec 1, 2022
  6. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    709
    lesmatt likes this.
  7. patrickjarnfelt

    patrickjarnfelt

    Joined:
    Jun 24, 2013
    Posts:
    20
    Ahh shooot. Yes, did a system update (to Ventura) and it probably fits with when it started happening!