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

Dirty nodes when dynamically setting config #37207

Closed
wants to merge 1 commit into from

Conversation

NickGerleman
Copy link
Contributor

Summary:
Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Differential Revision: D45505089

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels May 2, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45505089

@analysis-bot
Copy link

analysis-bot commented May 2, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,719,076 +136
android hermes armeabi-v7a 8,029,883 +159
android hermes x86 9,206,480 +191
android hermes x86_64 9,059,824 +140
android jsc arm64-v8a 9,283,453 +133
android jsc armeabi-v7a 8,471,720 +155
android jsc x86 9,342,213 +191
android jsc x86_64 9,599,202 +142

Base commit: 1af868c
Branch: main

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request May 7, 2023
Summary:
X-link: facebook/react-native#37207

Pull Request resolved: facebook#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: b8d012c4cf4696993adb88b27aae9bfd8c66bd04
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: c567b6d79d3f04822dcc05c2c532a1db5f2eae5d
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45505089

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45505089

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: ca3cf1054d98506b6dd67b3137cb51ac09179da5
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request May 7, 2023
Summary:
X-link: facebook/react-native#37207

Pull Request resolved: facebook#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: 7c70e2c2233165de52f856a8d3a2e9e2481028a8
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: 00597987f94cfd7ae3f8b8d5f62d807380807386
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45505089

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request May 7, 2023
Summary:
X-link: facebook/react-native#37207

Pull Request resolved: facebook#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: e4276ac9d9ad8a6cfec732af8c14d5971767e8a9
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45505089

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: f33eb49fb3d9cd0411b26bd46f8fd41be854d16c
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45505089

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: 1dd79391a6a01a9053684554320d46024031ddd4
Summary:
Pull Request resolved: facebook#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: 7fc796a0df0f0d416c28d56ff0a5e25e12b3da76
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45505089

facebook-github-bot pushed a commit to facebook/yoga that referenced this pull request May 7, 2023
Summary:
X-link: facebook/react-native#37207

Pull Request resolved: #1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: 72b2b84ba758679af081d92e7403750c9cc53cb5
facebook-github-bot pushed a commit to facebook/litho that referenced this pull request May 7, 2023
Summary:
X-link: facebook/react-native#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: 72b2b84ba758679af081d92e7403750c9cc53cb5
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 7, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in bde38d5.

jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37207

X-link: facebook/yoga#1274

Yoga exposes public APIs for dirtying Nodes, but will itself perform dirty marking when changing bits which invalidate layout. E.g. changing the style of a Node will invalidate it along with every parent Node.

Because config setting is newly public to the C ABI, this makes a similar change so that replacing a Node's config will dirty the tree above the node if there is a layout impacting config change (I don't think children need to be invalidated since child output shouldn't change given the same owner dimensions).

One quirk of this is that configs may be changed independently of the node. So someone could attach a config to a Node, then change the live config after the fact. The config does not currently have a back pointer to the Node, so we do not invalidate in that case of live config edits. The future work to rectify this would be to make configs immutable once created.

There are also currently some experimental features here which should maybe be compared, but these should be moved to YGErrata anyway.

Reviewed By: javache

Differential Revision: D45505089

fbshipit-source-id: 72b2b84ba758679af081d92e7403750c9cc53cb5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants