You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a lot of unprofiled or incorrectly profiled code in the library (see World:query). Profiling all parts of Matter will allow us to narrow down performance issues in Matter's internals.
The text was updated successfully, but these errors were encountered:
I agree with adding more diagnostics, but not for the same reason. We want to implement this to allow the users know how much the iteration is taking of their systems' times.
We may want to be careful with debug profiler as they add non trivial overhead which is problematic for iterators that run multiple times and I don't think O2 removes them.
If we just want to give people the query speeds in their systems, all we have to do is make our debugger call a query for each entity archetype, or cached queries, I am not sure. For this the debugger needs to hook the world which I think it already does at some point?
If we want to use it internally between ourselves to track performance issues, I suggest we make a test build of sorts that enables profiling. We shouldn't impose this on the users.
Side note: if you are just curious about the performance issues in the internals then most of the overhead from the query is clearly the expanding, where 60% of that function goes to unpack. And the rest goes to nextItem, maybe something to do with it doing extra gymnastics to prevent iterator invalidation.
I think that, especially with the world rewrite in progress, we should make sure code paths are accurately and extensively profiled. What if we had an API to enable debug profiling? That solves the overhead problem.
There is a lot of unprofiled or incorrectly profiled code in the library (see
World:query
). Profiling all parts of Matter will allow us to narrow down performance issues in Matter's internals.The text was updated successfully, but these errors were encountered: