Create feature flag to make estimation for remaining time in frame for view preallocation more precise#46563
Closed
rubennorte wants to merge 1 commit into
Closed
Create feature flag to make estimation for remaining time in frame for view preallocation more precise#46563rubennorte wants to merge 1 commit into
rubennorte wants to merge 1 commit into
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D62962341 |
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D62962341 |
f75b10e to
220ac15
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D62962341 |
220ac15 to
a10737d
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D62962341 |
a10737d to
14d77f7
Compare
…r view preallocation more precise (facebook#46563) Summary: Pull Request resolved: facebook#46563 Changelog: [internal] Our current implementation of view preallocation on Android runs very early in the frame (during the `animation` stage, after `input` and before `traversal`). In that implementation, we check the remaining time in the frame and we allocate half of that time for view preallocation. This logic can make us drop frames unnecessarily, if the work that we need to do after this allocated time is longer than we expect. Because we don't know how long the `traversal` stage will be, we don't account for that time at all (or, at best, we do only use half of the remaining time). This creates a feature flag to move view preallocation outside of the choreographer, so we can compute the remaining time considering all the work we did in the frame, and not just the work we did in the input stage. Reviewed By: javache Differential Revision: D62962341
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D62962341 |
14d77f7 to
5b079bc
Compare
Contributor
|
This pull request has been merged in fea0aa7. |
Collaborator
|
This pull request was successfully merged by @rubennorte in fea0aa7 When will my fix make it into a release? | How to file a pick request? |
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Mar 5, 2025
Summary: Changelog: [internal] This effectively reverts D62962341 / facebook#46563 as the experiments didn't provide the expected wins and we don't have bandwidth to iterate on this. Differential Revision: D70622429
facebook-github-bot
pushed a commit
that referenced
this pull request
Mar 5, 2025
…lag (#49841) Summary: Pull Request resolved: #49841 Changelog: [internal] This effectively reverts D62962341 / #46563 as the experiments didn't provide the expected wins and we don't have bandwidth to iterate on this. Reviewed By: rshest Differential Revision: D70622429 fbshipit-source-id: c53c9437448c0a7be8f5b4f04d6369efbd99105a
This file contains hidden or 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
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.
Summary:
Changelog: [internal]
Our current implementation of view preallocation on Android runs very early in the frame (during the
animationstage, afterinputand beforetraversal). In that implementation, we check the remaining time in the frame and we allocate half of that time for view preallocation.This logic can make us drop frames unnecessarily, if the work that we need to do after this allocated time is longer than we expect. Because we don't know how long the
traversalstage will be, we don't account for that time at all (or, at best, we do only use half of the remaining time).This creates a feature flag to move view preallocation outside of the choreographer, so we can compute the remaining time considering all the work we did in the frame, and not just the work we did in the input stage.
Differential Revision: D62962341