Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Feedback BeginPackageInitialization called every Tick, causes 40ms cost

Discussion in '2019.3 Beta' started by Peter77, Nov 1, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
    I noticed b8 is quite laggy and the Profiler revealed "BeginPackageInitialization" is being called every Tick, causing almost 40ms cost.

    Just from the name "BeginPackageInitialization" I would expect it should be called once only, rather than per-frame?

    Is this on your radar?

    Profiler_BeginPackageInitialization.png
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,143
    Last edited: Nov 6, 2019
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
    If it's part of an new/empty 3D project then it was installed, otherwise I doubt it. I'll check this in b9 and see if the package is installed and then if removing it makes the issue disappear. Thanks for the reply!
     
    LeonhardP likes this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,650
    yep, that was it. Removing the package gets rid of the 40ms cost. Thanks for the hint!

    Quick question though, why is the XR Management package part of a new/empty "3D" Project? Perhaps it makes sense to remove it from "3D" and make it available in the "3D with Extras" template instead?
     
    charlesb_rm, LeonhardP and eterlan like this.
  5. eterlan

    eterlan

    Joined:
    Sep 29, 2018
    Posts:
    177
    Thank you guys soooooo much!! I suffer from this problem these two month.. I thought it was problem of my computer or Odin inspector...
     
    LeonhardP likes this.