(Case 940666) Physics2D significant performance cost (even when no Physics2D features are used)

The Profiler in Unity 2017.2.0b6 shows a significant cost for “Physics2D”, even when no Physics2D features are used. This issue occurs in a build and editor. This issue does not seem to exist in Unity 2017.1.0p1.

I noticed this in my actual project, where I don’t use any Physics2D features, but Physics2D often peaked to more than 2ms in the Profiler. I was able to reproduce this issue in a simple project by just rotating a few Rigidbodies.

Video

Reproduce

  • Open user project
  • Open Assets/Scene.unity
  • Open Window/Profiler
  • Enter “Physics2D” in Profiler search field
  • Press Play

Observe Physics2D comes with a significant cost. The provided example spends about 1ms in Physics2D. The cost is directly related to the number of Rigidbodies.

Expected
Physics2D costs 0 ms, if no Physics2D features are used.

2 Likes

The bug-report can be found in the Issue Tracker now:

Again Excellent bug report and find Peter good work…
Performance seems be real struggle with Unity testers

1 Like

I think simply adding rigidbodies (even if they are kinematic) activates physics2D to do stuff.

That’s definitely been the case for 3d physics for a while at least.

@Peter77 get ready to receive many unity beta tshirts :wink:
(I didn’t know we had search field in the profiler)

1 Like

With a text saying “I spent hundreds of hours reporting Unity bugs and all I got was this lousy T-shirt”?! :roll_eyes:

Yup, that’s how they roll now.
A few releases back you would have gotten $100 in asset store credit. I did and used it all, it was useful.
A few weeks back I received an email thanking me for my contribution in the beta, offering me 2 beta tshirts. Since the design is meh and I am not one to wear brands, I played a prank on a friend. He hates Unity with a passion, I had unity send those tshirts to him :smile:
In XXL

I actually think it’s a nice gesture and I appreciate that. However, I did spend so much time submitting high-quality bugs reports over the last years, that I believe a life-time Unity license should be the least what Unity Technologies should offer me. :hushed:

I think they will do that eventually, when they realize that the cost of sifting through crappy bug reports is more than the “non gain” of giving a year of pro license to ace bug reporters.
Right now, we let them enjoying free community labor.