Search Unity

Feedback BuildContentUpdate take too much time as no effect of increment build

Discussion in 'Addressables' started by MarsZhouCN, Aug 21, 2019.

  1. MarsZhouCN

    MarsZhouCN

    Joined:
    Dec 19, 2017
    Posts:
    31
    Hi guys,
    I am working on addressables , and I have meet some issue about build.
    I wish I can build my addressables assets incremently , I think that 'AddressableAssetSettings.BuildPlayerContent();' means build all again without incremently build , and I think I can use 'ContentUpdateScript.BuildContentUpdate(AddressableAssetSettingsDefaultObject.Settings, path);' for incremently build, with will take less time after first build.
    But I found that I have token the same time when I used 'BuildContentUpdate' even if I have built for twice or more times.
    I have tried to do the follow steps copy from sources codes before using BuildContentUpdate but it seems the same, no effect .
    Code (CSharp):
    1.  var settings = AddressableAssetSettingsDefaultObject.Settings;
    2. var buildPath = ContentUpdateScript.GetContentStateDataPath(false);
    3. var modifiedEntries = ContentUpdateScript.GatherModifiedEntries(settings, buildPath);
    4. ContentUpdateScript.CreateContentUpdateGroup(settings, modifiedEntries, "Content Update");
     
  2. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    That's interesting. I'd try and profile the build and see where the time is spent, if that's possible. I am curious, because my local version of addressables has some performance fixes that may or may not affect your use case.
     
  3. HugoClip

    HugoClip

    Joined:
    Feb 28, 2018
    Posts:
    52
    As far as I know BuildContentUpdate takes the same time as BuildPlayerContent as they use almost the same code.
    I could be wrong tho, @unity_bill ?
     
  4. MarsZhouCN

    MarsZhouCN

    Joined:
    Dec 19, 2017
    Posts:
    31
    I have tried and found out that it spend all the time on BuildPlayerContent .
     
  5. MarsZhouCN

    MarsZhouCN

    Joined:
    Dec 19, 2017
    Posts:
    31
    Me too.
     
  6. androshchuk-vladyslav

    androshchuk-vladyslav

    Joined:
    Dec 13, 2015
    Posts:
    127
    Like code is the same. 1 to 1. It just get info about version from .bin file before build.
     
  7. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    The build cache should help with the bits that have not changed though. Unless of course we're comparing a cached build with a cached update, or a build and an update where everything's been touched. That's why I suggested profiling the internals.
     
    unity_bill likes this.
  8. MarsZhouCN

    MarsZhouCN

    Joined:
    Dec 19, 2017
    Posts:
    31
    I think it 's because of that I packed bundles using their suffix, which means I will pack all the prefabs into one group.
    I have tried to set the group pack mode to 'PackSeparately' , but ' IOException: Win32 IO returned 234.' will be occur. which means the bundle file path is too long .
     
  9. MarsZhouCN

    MarsZhouCN

    Joined:
    Dec 19, 2017
    Posts:
    31
  10. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @unity_bill Any idea on what's going on there? We'd prefer incremental builds rather than having to wait forever every time we make a slight content change.
     
    IS_Twyker likes this.