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

Work around performance issues #11

Merged
merged 2 commits into from
Jul 17, 2020
Merged

Work around performance issues #11

merged 2 commits into from
Jul 17, 2020

Conversation

jbaiter
Copy link
Member

@jbaiter jbaiter commented Jul 17, 2020

As mentioned in #10, performance is currently atrocious for larger objects or generally on low-powered devices. As a stop-gap until we get around to actually improve the renderer, this PR implements two measures to achieve an acceptable compromise between performance and usability:

  • Invisible text is now hidden during animations when only 'selectable' is activated. The reasoning is that during animation selection is not going to work reliably anyways.
  • If visibility is enabled and we we detect tasks that ran longer than 350ms during an OSD animation, we also hide visible text during animation to improve performance. The user is notified with a snackbar in order to reduce confusion about the disappearing text.

As mentioned in #10, performance is currently atrocious for larger
objects or generally on low-powered devices. As a stop-gap until we get
around to actually improve the renderer, this PR implements two measures
to achieve an acceptable compromise between performance and usability:

- Invisible text is now hidden during animations when only 'selectable'
  is activated. The reasoning is that during animation selection is not
  going to work reliably anyways.
- If visibility is enabled and we we detect tasks that ran longer than
  350ms during an OSD animation, we also hide visible text during
  animation to improve performance. The user is notified with a snackbar
  in order to reduce confusion about the disappearing text.
@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2020

Codecov Report

Merging #11 into master will decrease coverage by 5.77%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
- Coverage   65.00%   59.22%   -5.78%     
==========================================
  Files          10       11       +1     
  Lines         400      439      +39     
  Branches      121      130       +9     
==========================================
  Hits          260      260              
- Misses        116      150      +34     
- Partials       24       29       +5     
Impacted Files Coverage Δ
src/components/MiradorTextOverlay.js 0.00% <0.00%> (ø)
src/lib/perf.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e195348...936a005. Read the comment docs.

src/components/MiradorTextOverlay.js Show resolved Hide resolved
src/components/MiradorTextOverlay.js Outdated Show resolved Hide resolved
src/components/MiradorTextOverlay.js Outdated Show resolved Hide resolved
src/components/MiradorTextOverlay.js Show resolved Hide resolved
@jbaiter jbaiter merged commit ea02a5b into master Jul 17, 2020
@jbaiter jbaiter deleted the performance-workaround branch July 17, 2020 13:35
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

Successfully merging this pull request may close these issues.

3 participants