Skip to content

Cache uuid pattern #80

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

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Cache uuid pattern #80

merged 1 commit into from
Oct 2, 2024

Conversation

theEvilReaper
Copy link

Proposed changes

The MojangUtils class uses a regular expression (RegEx) pattern to transform a UUID from its string representation into the standard UUID format. Currently, the pattern is recompiled each time the method is called. While this approach works, it may introduce unnecessary overhead due to the repeated pattern compilation. This pull request optimizes performance by caching the Pattern, eliminating the additional overhead

Types of changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.

  • I have read the CONTRIBUTING.md
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@theEvilReaper theEvilReaper added the hacktoberfest Only be used during the Hacktoberfest label Oct 1, 2024
@theEvilReaper theEvilReaper requested a review from a team as a code owner October 1, 2024 07:13
@github-actions github-actions bot added the Bugfix label Oct 1, 2024
@theEvilReaper theEvilReaper added hacktoberfest-accepted and removed hacktoberfest Only be used during the Hacktoberfest labels Oct 1, 2024
Copy link

sonarqubecloud bot commented Oct 1, 2024

@theEvilReaper theEvilReaper merged commit f1387be into master Oct 2, 2024
7 checks passed
@theEvilReaper theEvilReaper deleted the fix/patternUsage branch October 2, 2024 07:18
TheMeinerLP pushed a commit that referenced this pull request Oct 31, 2024
TheMeinerLP pushed a commit that referenced this pull request Jan 6, 2025
@TheMeinerLP TheMeinerLP mentioned this pull request Jan 6, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant