FPtje / Falcos-Prop-protection

Falco's prop protection
35 stars 38 forks source link

Anti E2 Mingery is lagging complex E2's #295

Closed Bryantdl7 closed 3 years ago

Bryantdl7 commented 3 years ago

Please look at the two photos for example:

With anti mingery turned off image

the second I disable anti e2 mingery: image

As you can see, there is a significant different in CPUtimes the second this is modified. I am not sure if something changes with your checks recently to make this take up more processing power in how you prevent mingery, but it affects build servers significantly.

Thanks in advance!

FPtje commented 3 years ago

The only thing that changed recently is an IsValid check in #293. I'm not at all convinced that this could cause an extreme performance degradation though. Validity checks are very cheap with regards to performance.

Either way, it is expected that there is some performance difference between having the option on or off. Specifically when you use the applyForce(e:v) function in your e2. This is because it has to do something to do its work.

You could check before and after #293, but I honestly doubt that you will see a statistically significant difference. If there's a bottleneck, I expect it to be in getting the constrained entities or setting the collision group. That is something it has done since the beginning.

FPtje commented 3 years ago

Closing. If you have updates you can still post in this issue.