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

Removes no-keyword pattern from ExprNewBannerPattern #7546

Open
wants to merge 2 commits into
base: dev/patch
Choose a base branch
from

Conversation

sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Jan 29, 2025

Description

This pattern was responsible for significant slowdown in parsing due to its lack of required keywords.
Removing this pattern caused one test case of 3000 structures to go from a 4 minute parse time to a 1 minute parse time.


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

@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) labels Jan 29, 2025
Copy link
Contributor

@Fusezion Fusezion left a comment

Choose a reason for hiding this comment

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

doesn't matter but here!

It was decided not to attempt to reimplement the pattern as no safe and reasonable pattern was found.
Copy link
Contributor

@TheAbsolutionism TheAbsolutionism left a comment

Choose a reason for hiding this comment

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

ggs

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.

If you wanted it to be (semi) non-breaking, you could generate a choice pattern out of all of the colour names, since a choice can be used like pattern keywords.

@Efnilite Efnilite added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 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.

7 participants