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

Allow lazy resolution of edge dimension values #1453

Closed
wants to merge 1 commit into from

Conversation

NickGerleman
Copy link
Contributor

Summary:
This follows the previous patterns used for Gutters and Dimension, where we hide CompactValue array implementation from yoga::Style callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if StyleValuePool is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like marginLeft. Doing this, in the new style, also lets us remove IdxRef from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

@facebook-github-bot
Copy link
Contributor

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

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

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

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

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

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

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

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

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

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

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

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

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

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

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 804231421f87fc432d47bdb144b90b4b93f2dd4d
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 8, 2023
Summary:
X-link: facebook/react-native#41347


This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 8, 2023
Summary:
X-link: facebook/react-native#41347


This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 8, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: e2a5521cec110cdf7d3290bed3e88bd9d27aea83
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 8, 2023
Summary:
X-link: facebook/react-native#41347


This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 8, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 342a611eddbbbb60782175f1d51bc1780305a97e
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 9, 2023
Summary:
X-link: facebook/react-native#41347


This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 9, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164

fbshipit-source-id: 4b7a231300799209306e52d8ed07837d2e54fb17
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 9, 2023
Summary:
X-link: facebook/react-native#41347


This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 14, 2023
Summary:
X-link: facebook/react-native#41347

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 724e7a78c46748ef634acd1ee874c1c74b8880ea
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 9882ec4598948c81a925dbba94ddbe3d401d53f0
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 7af3d2b4afd1e9dfc50d63426506ab10dfb9973c
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 1c675534f98805bc938b1badaadfc0a548bc6ce2
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: d61af81dd92d35069d6be41f5458e447e4453078
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 14, 2023
Summary:
X-link: facebook/react-native#41347

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: a88a8d0daebb97fff9cb230c7103f080bc14cb36
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: c498c26d3c95664225466baf090408ffbc3e6300
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 14, 2023
Summary:
X-link: facebook/react-native#41347

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 5313af3e01f3c282ccce002bae3749850a0dd6f3
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: c3d4ef15e16cb4d247e9bbeeee921079b9b116b0
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: d6d88835d5260d17697bffb557be6d5d22c1dbcf
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: cd4c6d9e6c91f38c9cd003977f707e0f2a456d49
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 14, 2023
Summary:
X-link: facebook/react-native#41347

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 322e46372dac6401d480587dab6658fad00da2a1
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 14, 2023
Summary:
X-link: facebook/react-native#41347

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 505b843653cba057e04109581675777b4e41bd05
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 5b0edb423c6dfce713d874dd50481bfd7e81f8ad
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 9885adfe71c702cab7a19487e979246fbee623fb
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 14, 2023
Summary:
X-link: facebook/react-native#41347

Pull Request resolved: facebook#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 62dc0c1c734b42b88a0058f3a31150e94c670826
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: 2f3558b153eec03dafcdfd911197e931408e6b60
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Differential Revision: D50998164

fbshipit-source-id: a7e8b93b699c94adaed284d23c3ba0e86a0785a3
facebook-github-bot pushed a commit to facebook/litho that referenced this pull request Nov 14, 2023
Summary:
X-link: facebook/react-native#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164

fbshipit-source-id: 248396f9587e29d62cde05ae7512d8194f60c809
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Nov 14, 2023
Summary:
Pull Request resolved: #41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164

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

This pull request has been merged in f2c8aca.

@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by 27af596.

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Nov 21, 2023
Summary:
X-link: facebook/react-native#41347


This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164
@facebook-github-bot
Copy link
Contributor

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

Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
Summary:
Pull Request resolved: facebook#41347

X-link: facebook/yoga#1453

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164

fbshipit-source-id: 248396f9587e29d62cde05ae7512d8194f60c809
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants