Search Unity

1.8.3 update excruciatingly slowly re-importing addressable prefabs

Discussion in 'Addressables' started by dizzy2003, Apr 21, 2020.

  1. dizzy2003

    dizzy2003

    Joined:
    Nov 25, 2013
    Posts:
    108
    I have a tool I have been using that adds a bunch of my prefabs to addressable groups using
    CreateOrMoveEntry(guid,group,false,false).

    Up to now its been very quick (no prefab reimport). but since using 1.8.3 unity now reimports each of those prefabs 1 by 1 very slowly, even though the prefabs themselves havent changed, (They are checked out in perforce and I can diff them to see no changes)

    about a thousand prefabs. its been an hour so far.

    I assume the same thing would occur if I dragged the prefabs into an addressable but havent been able to test that
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    what version were you using before? If I diff 1.7.5 to 1.8.3 I'm not seeing where we could have introduced a problem, so knowing what you were using before would help us understand what may have changed.
    What version of the editor are you on? Any chance you also changed editor versions?

    Also, are you meaning it's loading them, or is it actually doing a re-import?

    Thanks for letting us know.
     
  3. dizzy2003

    dizzy2003

    Joined:
    Nov 25, 2013
    Posts:
    108
    I went from 1.7.5 to 1.8.3 am on Unity 2019.3.1f1.

    Am going to revert back to 1.7.5 to double check its not some local change to our codebase causing the issue.
     
  4. dizzy2003

    dizzy2003

    Joined:
    Nov 25, 2013
    Posts:
    108
    I reverted back to 1.7.5 and the issue has gone away.

    To be clear here is my workflow.

    I have a tool that finds instances of certain classes that reference gameObjects. I have previously changed the code so theres a GameObject Reference and an Asset Reference.

    The tool adds the gameObject (a prefab) to the addressable system using

    var settings = AddressableAssetSettingsDefaultObject.Settings;


    foreach(var x in biglistofx)
    {
    long localID;
    if ( AssetDatabase.TryGetGUIDAndLocalFileIdentifier(x.m_Prefab, out guid, out localID))
    {
    settings.CreateOrMoveEntry(guid, addGroup, false, false);
    x.m_AssetReference = new AssetReference(guid);
    x.m_Prefab = null;
    EditorUtility.SetDirty(x);
    }
    }

    Note I am setting class x to dirty not the prefab being pointed to

    after this completes I click save Project to make sure everything has been written out

    on 1.7.5 save project is very quick and the prefabs made addressables are not reimported or checkedout
    on 1.8.3 the prefabs that have become addressables all get reimported unusally slowly (3 seconds each) and are all checkedout on perforce but without any actual diff.
     
  5. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    hmm. I can't figure this one out. Could you please file a bug against Unity with a repro project? This definitely should not be happening. If you can make that ticket, please put the ticket number here so I can eyes on it quickly.