How to interpret 'World tracking performance is being affected by resource constraints [1]'

I am seeing this message show up alongside camera pose jitterness and frame rate drops in my ARKit application: `

World tracking performance is being affected by resource constraints [1]`


I am profiling the app to find any other non-ARKit tasks that can be optimized to open up more resources for ARKit. But I wonder if there is any more information that can be gleamed for the message itself? I have not been able to find any documentation about this message. Specifically, what does the [1] signify? I have seen this message mentioned in other forum posts with a [0] suffixed instead so I assume it has some significance?

Accepted Reply

The reason is that the app itself is using too much compute and it’s starving the world tracking thread of either data (images and CoreMotion updates) or CPU time. This will result is that world tracking will become less accurate (bad user experience) and eventually fail to track altogether. The recommended recourse is to have an app that uses less computation on other threads.

Replies

I'm not sure about this but in testing my new AR Game which is fairly intense I can only say that if you only see that message every once in a while, it might be related to a spike happening outside the app, but in the beginning when i was having trouble implementing ARSKView the message occurred constantly and the performance was very poor.


If you're getting good performance, I'd say just check for leaks, watch the performance closely and just treat it was a warning.


Better devices should also do away with these "constraints" anyway.


Is the message constantly streaming or only happening occasionally?


Do these occasions occur with events in your app?


What does your CPU usage look like when this happens?




In my case until I built a fresh ARKit Target ARSKView was sharing resources with SKView in my game so I got rid of the old code and the warning stopped.

The reason is that the app itself is using too much compute and it’s starving the world tracking thread of either data (images and CoreMotion updates) or CPU time. This will result is that world tracking will become less accurate (bad user experience) and eventually fail to track altogether. The recommended recourse is to have an app that uses less computation on other threads.

During my experimentation I tried pausing the scenes which were being temporarily set aside and also loading ARSKView in an empty SKView.


Something about that setup seemed to choke it under otherwise perfect circumstances.


Thanks for the response though!

Thanks for the explanation.


Is it possible to determine whether the bottleneck is primarily data I/O or CPU? The app is using both somewhat heavily. I am trying to debug the app with Instruments, is there a wasy to get this message to be tagged in Instrument traces?

I also get this when looking for a particular ARReferenceObject, with nothing else happening in the app. Other objects work fine.