Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance drops dramatically changing tracking state from limited to normal #236

Closed
jacogasp opened this issue Oct 25, 2019 · 7 comments
Closed

Comments

@jacogasp
Copy link

I pulled the last commits from develop and now I always experience really poor performance when the tracking state change from normal to limited, insufficient feature to normal again.
Everything becomes extremely laggy and I have to restart my application.

Here the log that it prompts every time

camera did change tracking state: limited, initializing
camera did change tracking state: limited, relocalizing
camera did change tracking state: normal
camera did change tracking state: limited, insufficient features
camera did change tracking state: normal
[Technique] World tracking performance is being affected by resource constraints [1]
[Technique] VIO error callback: 26859.984836, 1, Frame processing rate has fallen below pre-set threshold
[Technique] VIO error callback: 26860.484814, 1, Frame processing rate has fallen below pre-set threshold
[Technique] World tracking performance is being affected by resource constraints [1]
[Technique] VIO error callback: 26861.251447, 1, Frame processing rate has fallen below pre-set threshold
[Technique] VIO error callback: 26861.534768, 1, Frame processing rate has fallen below pre-set threshold
[Technique] VIO error callback: 26861.634764, 1, Frame processing rate has fallen below pre-set threshold
[Technique] World tracking performance is being affected by resource constraints [1]
...
@pcmanik
Copy link

pcmanik commented Nov 8, 2019

@intere or @aaronbrethorst can you please take a look on that?
Currently it's in unusable state.

@halmueller
Copy link
Collaborator

If someone who's seeing the performance regression will run a git bisect and pin down which commit introduced the regression, I'll take a look (https://flaviocopes.com/git-bisect/ is a good quickstart).

@pcmanik
Copy link

pcmanik commented Nov 11, 2019

This regression was introduced between 1.1.0 and 1.2.0.
Probably it is caused by bdf0b1d I don't see any other commit which could cause that issue.

@halmueller
Copy link
Collaborator

You two are in the best positions of anyone to nail this down, since you have a reproducible regression case. No one else can run the diagnostics. Do you have a repro that you can share?

To pin down what's going on, I suggest:

  • run the git bisect to confirm that you've found the commit. I don't see anything in bdf0b1d that looks suspicious; it's mostly a red commit with a change to convenience initializer.
  • What frame rates are you seeing before/after?
  • What does Instruments have to say about the functions that are using the most CPU?

@jacogasp
Copy link
Author

From what I've seen so far, the issue seems disappeared, without any significant changes in my code. So I suppose that the issue could potentially be related to a iOS bug that has been fixed with one of the latest releases.

But I can say that:

  • iOS was showing 60 fps even if everything (even the UI response) was extremely laggy. It was looking like the app was freezing every ~1s
  • With the Time Profiler instrument I saw that the function using the most CPU was for sure locationNode.updatePositionAndScale() at L267

@Pilot-Marc
Copy link
Collaborator

PR #249 fixed a significant memory leak that could be the culprit to this issue. You might want to pull the develop branch and retest.

@jacogasp
Copy link
Author

The issue seems to be fixed after @Pilot-Marc PR #249
Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants