-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: requestlayout improvements #9122
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
fix: requestlayout improvements #9122
Conversation
It is totally unecessary to call multiple requestLayout inside initNativeView (properties set) Even worse we dont need to do any requestLayout from “onLoaded” as the parent will layout itself/children
This comment was marked as abuse.
This comment was marked as abuse.
Which app are you referring to? |
@farfromrefug |
@NathanWalker thanks was not sure @NathanaelA was refering to another one. |
…questlayout_improvements
@rigor789 should be all good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@farfromrefug I'm curious if your fork may have a different setting than most? I've noticed that on all your PR's we can not update the PR with base automatically on github however for all other pr's we are able to. Is there a setting on your fork that may be preventing that? We could help get quite a few of your pr's merged if we can update them with latest master automatically here. |
@NathanWalker you mean on my PR s you font have the right to update? I always create PRs from github website but I have to say I almost never ensure the checkbox for collaboration is checked or not. though it should be by default |
…questlayout_improvements
…questlayout_improvements
This causes unecessary `requestLayout`
It was unnecessary to make multiple calls requestLayout inside initNativeView (properties set)
This reverts commit 4f5f0aa.
This reverts commit 4f5f0aa. This commit breaks back-navigation in certain cases, most prominently with Button pseudo classes. We plan to revisit this.
This is a first pass at improving
requestLayout
. The biggest improvements are seen on iOS.applyAllNativeSetters
orapplyPendingNativeSetters
preventrequestLayout
calls on every property change. Instead callrequestLayout
if needed at the end. This is a big change on iOS as most properties are marked as affecting layout.requestLayout
at all if withinonLoaded
. it is not necessary as the parent with layout itself and thus layout all its children.With that change, the colors fixes and the android background color change simplification, i see a 5-10% shorter loading time on android. Tested it with different apps of different complexity.