Search Unity

Bug Pefroamnce BUG A lot of GC when loading Subscene

Discussion in 'Graphics for ECS' started by lic1227, Nov 11, 2021.

  1. lic1227

    lic1227

    Joined:
    Jul 14, 2015
    Posts:
    41
    As shown in the picture,there's a lot GC When loading Subscene,which causing CPU Spike.
    upload_2021-11-11_16-42-39.png

    And someof code with GC problems
    upload_2021-11-11_16-46-18.png
    upload_2021-11-11_16-46-23.png
     
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    You can avoid running the "m_MissingSHQueries" code by ensuring that your entities already have the corresponding light probe components when initially loaded, which saves the light probe system from having to create them.

    We will try to optimize the Hybrid Renderer ID allocation in a future version.
     
    apkdev likes this.
  3. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    Also, make sure you have leak tracking completely disabled when profiling this, as it significantly increases allocation costs.
     
    apkdev likes this.