Skip to content

Variables::getMemberProperties(): add caching - #466

Merged
jrfnl merged 1 commit into
developfrom
utils/variables-getmemberproperties-add-caching
Apr 29, 2023
Merged

Variables::getMemberProperties(): add caching#466
jrfnl merged 1 commit into
developfrom
utils/variables-getmemberproperties-add-caching

Conversation

@jrfnl

@jrfnl jrfnl commented Apr 29, 2023

Copy link
Copy Markdown
Member

Follow up on #332

While parsing the properties of property declarations was reasonably straight forward, with the introduction of union type in PHP 8.0, intersection types in PHP 8.1 and disjunctive normal form types in PHP 8.2, the retrieving of the property type has become more token walking intensive.

With that in mind, caching the results of the function seems prudent.

Includes a dedicated test to verify the cache is used and working.

Follow up on 332

While parsing the properties of property declarations was reasonably straight forward, with the introduction of union type in PHP 8.0, intersection types in PHP 8.1 and disjunctive normal form types in PHP 8.2, the retrieving of the property type has become more token walking intensive.

With that in mind, caching the results of the function seems prudent.

Includes a dedicated test to verify the cache is used and working.
@jrfnl jrfnl added this to the 1.0.x Next milestone Apr 29, 2023
@jrfnl
jrfnl merged commit fa8932a into develop Apr 29, 2023
@jrfnl
jrfnl deleted the utils/variables-getmemberproperties-add-caching branch April 29, 2023 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant