Search Unity

Addressables Groups Window is very slow

Discussion in 'Addressables' started by Jribs, Feb 11, 2020.

  1. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    154
    We recently updated to addressables 1.6 so we can get the fixes for the groups being deleted at random times.

    But it looks like this version also has a very bad issue with the addressables group window being extremely slow.

    When you first open the window....wait 3 minutes.
    When you have the window open and press play...wait 3 minutes
    When you drag an item into the window...wait 3 minutes

    Whats the deal with this and how can I stop it from being like this? This is a pretty urgent need.
     
  2. SXtheOne

    SXtheOne

    Joined:
    Sep 5, 2018
    Posts:
    21
    Same here. Since I updated to 1.6.0 I need to wait minutes in Addressable Groups window for changes to take effect.

    I also have a ScriptableObject which contains AssetReference[ ] array with 310 elements. Opening that in the Editor is very slow as well (although I don't know if this was faster with earlier versions because it's a new class).
     
  3. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    154
    @DavidUnity3d Do you have any quick fix we can change in the code to fix this while a real fix is in the works? This is a very time consuming issue.
     
  4. vzlomvl

    vzlomvl

    Joined:
    Jun 25, 2016
    Posts:
    43
    Same issue(30sec-2min freeze). Addressable version 1.6.0.
     
    Last edited: Feb 12, 2020
  5. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey all, we're aware of the problem and are actively looking into it. I do have something you can try but I'm not sure it'll work. In AddressableAssetEntry.GatherAllAssets you should see a block of code that looks like
    Code (CSharp):
    1. if( guid != ResourcesName && guid != EditorSceneListName && TargetAsset == null)
    2. {
    3.     string path = AssetPath;
    4.     if( string.IsNullOrEmpty(AssetPath) && IsSubAsset )
    5.         path = ParentEntry.AssetPath;
    6.     Debug.LogWarning(string.Format("NullReference in entry {0}\nAssetPath: {1}\nAddressableAssetGroup: {2}", address, path, parentGroup.Name));
    7. }
    at the top. Try just commenting that out to start. I think pinging that TargetAsset is what's causing at least a portion of the UI slowdown. Let me know if this works for you.
     
  6. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    154
    @DavidUnity3d thanks for the reply! I tested commenting out that block and I hesitate to say its better. It seems like maybe in certain situations like entering play mode is a little faster. But there is still a major lock up whenever the adderssables groups window is opened or focused.

    Edit: Actually theres a different issue i'm running into.
    Commenting out that block of code does indeed make it quicker and reduces the lock up to seconds rather than minutes.

    But there is a different issue that made me believe it wasn't working.
    * Context: I switch back and forth between XR enabled/disabled in my project a lot. Every time I switch, any changes to the addressables code I make gets reset somehow. So when switching, that code block becomes uncommented.
     
  7. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    @Jribs I'm glad it's helping you some. I'm surprised that code gets reset like that. I'm really not sure what's going there. We'll have an official fix out sometime soon so it shouldn't bother you anymore.
     
  8. vzlomvl

    vzlomvl

    Joined:
    Jun 25, 2016
    Posts:
    43
    @DavidUnity3d thanks. Now the window takes only 6 sec to open(instead of 2 min in some cases). Also time of changing of the lable was reduced too(Now ~20 sec instead of 2min).
     
    davidla_unity likes this.
  9. CameronND

    CameronND

    Joined:
    Oct 2, 2018
    Posts:
    89
    @DavidUnity3d I am getting my code resetting too. I can't make any code changes to the package without it becoming reset the next time I open the project.
     
  10. vzlomvl

    vzlomvl

    Joined:
    Jun 25, 2016
    Posts:
    43
    @Cameron-NotDoppler
    Just copy Addressable package to the Packages folder inside of the project folder and remove Addressable reference line from manifest.json
     
    CameronND likes this.
  11. CameronND

    CameronND

    Joined:
    Oct 2, 2018
    Posts:
    89
    Thanks, I will try that!