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

[LAD] [Alphanumeric] Update views to use Request Animation Frame (RAF) #4339

Closed
jvigliotta opened this issue Oct 19, 2021 · 2 comments · Fixed by #4486
Closed

[LAD] [Alphanumeric] Update views to use Request Animation Frame (RAF) #4339

jvigliotta opened this issue Oct 19, 2021 · 2 comments · Fixed by #4486

Comments

@jvigliotta
Copy link
Contributor

jvigliotta commented Oct 19, 2021

Is your feature request related to a problem? Please describe.
Currently not many views use RAF, which can increase performance by letting the browser determine when to update the page.

Describe the solution you'd like
Any time new data is going to be updated in the template, we should have that use RAF to determine the best time to do so. LAD Tables/LAD Table Sets/Alphanumerics are prime candidates for these as they update often and are not currently utilizing this built-in feature.

Additional context
This came up during testing display layouts with MANY views (Plot, LAD, Alphanumeric, etc.) and we've determined that this could provide performance enhancements.

Testing

  • this is a bit harder to test without having a reference, if able, test with and without this enhancement
  • for alphanumerics, create a display layout with MANY high frequency alphanumeric telemetry objects
  • for LAD tables create a lad table with MULTIPLE high frequency telemetry objects
  • throttle the CPU
  • watch FPS between the two versions using the same display layout
  • FPS should be noticeably better on the enhanced version
@akhenry
Copy link
Contributor

akhenry commented Oct 20, 2021

The Telemetry Table uses this approach and can be used as an example. One thing to note is that it's not enough just to queue a RAF callback, we also need a flag to ensure that only one RAF callback is queued at a time.

@shefalijoshi
Copy link
Contributor

Verified fixed.

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

Successfully merging a pull request may close this issue.

4 participants