Search Unity

Feedback 2020.2: AssetDatabase.Refresh comparison against Unity 4.6

Discussion in 'Asset Database' started by Peter77, Aug 30, 2020.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    During the Unity 2019.3 beta phase I reported that
    AssetDatabase.Refresh
    , which occurs after adding or updating assets in the project, is significantly slower than in earlier Unity releases such as Unity 4.6.

    Today I used the same project to retest whether it improved in Unity 2020.2. I triggered the "Create 100 assets" three times in each version, here are the results:



    Unity 4.6.9f1
    1. AssetDatabase.Refresh took 2.12 seconds
    2. AssetDatabase.Refresh took 1.99 seconds
    3. AssetDatabase.Refresh took 2.03 seconds
    Unity 2020.2.0a21
    1. AssetDatabase.Refresh took 1.35 seconds
    2. AssetDatabase.Refresh took 0.14 seconds
    3. AssetDatabase.Refresh took 0.17 seconds
    Conclusion
    AssetDatabase.Refresh
    performs significantly faster in Unity 2020.2.0a21 with the provided test project.
    upload_2020-8-30_8-10-43.png
     

    Attached Files:

  2. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Have u tried Unity 2020.2.0a21?
     
    Peter77 likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I used a21 to do the test actually, fixed in first post. Thank you.
     
    optimise likes this.
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    Congrats dev team!

    Now... compile time?
     
    Ruslank100 likes this.
  5. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Compile time is generally fast. Assembly reload time, on the other hand... which is even more annoying as that triggers a lot more often than just after code changes...
     
  6. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Good thing you can turn assembly reloading off!
     
  7. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    You can turn assembly reloading off for only one of the various cases that normally cause an assembly reload.