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

Variables::getMemberProperties(): add caching #466

Merged
merged 1 commit into from
Apr 29, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 29, 2023

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
49 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant