BeginPackageInitialization called every Tick, causes 40ms cost

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

The only related bug we had logged is this one:

Are you using the XR Management package? If so, upgrading it to 3.0.4-preview.1 should fix the issue. Otherwise, a bug report with a reproducible would be much appreciated.

4 Likes

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!

1 Like

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?

3 Likes

Thank you guys soooooo much!! I suffer from this problem these two month… I thought it was problem of my computer or Odin inspector…

1 Like