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

Only determine cache if needed #6604

Conversation

APickledWalrus
Copy link
Member

Description

Related to #6594

This PR updates the code in SkriptParser to only obtain the TypePatternElements cache (or calculate it if it is the first time) if the exprs array has a null value (that is, potentially has a default expression). This should prevent any unnecessary calls from being made.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@APickledWalrus APickledWalrus added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Apr 23, 2024
Copy link
Member

@Moderocky Moderocky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@Moderocky Moderocky added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Apr 23, 2024
@APickledWalrus APickledWalrus merged commit deac2f7 into SkriptLang:dev/patch Apr 30, 2024
4 checks passed
@APickledWalrus APickledWalrus deleted the patch/exprinfo-cache-improvements branch April 30, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants