-
Notifications
You must be signed in to change notification settings - Fork 21
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
Render loop optimizations #91
Merged
frank-weindel
merged 4 commits into
lightning-js:main
from
wouterlucas:feat/renderloop_optimizations
Dec 5, 2023
Merged
Render loop optimizations #91
frank-weindel
merged 4 commits into
lightning-js:main
from
wouterlucas:feat/renderloop_optimizations
Dec 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wouterlucas
added
the
do not merge
Do not merge this PR. It may not be ready or depends on another PR to be merged first.
label
Nov 23, 2023
wouterlucas
force-pushed
the
feat/renderloop_optimizations
branch
from
November 27, 2023 10:13
303f8e0
to
c4dfdda
Compare
frank-weindel
force-pushed
the
feat/renderloop_optimizations
branch
from
November 30, 2023 00:41
2812179
to
044e119
Compare
- Implement no render on no changes, add pause Raf handling - Implement recalculation updates, move clipping to CoreNode. - Avoid using forEach and casting the same props to an array each time. - Do not sort on every draw and implement presorting of the children. - Switch to Default shader, will need to optimize batched rendering. - Remove duplicate array in WebGlCoreRenderer and add RenderOps or Quads directly. - Make sure zIndex reordering only happens on .update(). - Avoid binding the same texture again. - Added simple stress test. Co-Authored-By: erikhaandrikman <erik_haandrikman@comcast.com>
wouterlucas
force-pushed
the
feat/renderloop_optimizations
branch
from
December 5, 2023 13:14
044e119
to
c1bcbaa
Compare
wouterlucas
removed
the
do not merge
Do not merge this PR. It may not be ready or depends on another PR to be merged first.
label
Dec 5, 2023
Will be added back in future PR
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've spent a few rounds of doing render loop optimizations and discovered there are several improvements that can be made. Consider this round # 1 of our performance hunt.
Current list of changes:
Benchmarking
We've used two benchmarking methods:
Observations, all tested on a RPI3 with WPEWebKit 2.42:
Simple animation on L2 @ 720p rendered at ~59 FPS
Simple animation on L3 @ 720p rendered at 33 FPS at the start of this exercise
Simple animation on L3 @ 720p renders at 47 FPS with the above changes, excluding texture rebindsSimple animation on L3 @ 720p renders at ~59 FPS
Blits stress test @ 1080p renders at 12 FPS prior to these changes
Blits stress test @ 1080p renders at 27 FPS with the above changes excluding texture rebinds
Blits stress test @ 1080p renders at 47 FPS with a texture rebind hack (TODO implementation).Blits stress test @ 1080p renders at 31 FPS with changes
@erikhaandrikman for all the support & hunting 🤟
Todo: