Skip to content

[MSHARED-815] Pattern.compile() called on every invocation of handleSpecificationEntries#377

Open
elharo wants to merge 2 commits into
apache:masterfrom
elharo:fix-370-pattern-compile-static
Open

[MSHARED-815] Pattern.compile() called on every invocation of handleSpecificationEntries#377
elharo wants to merge 2 commits into
apache:masterfrom
elharo:fix-370-pattern-compile-static

Conversation

@elharo

@elharo elharo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #370

Pattern.compile() is called on every invocation of handleSpecificationEntries(), creating unnecessary GC pressure. This extracts the constant regex pattern to a private static final Pattern field.

No behavior change; pure optimization.

@elharo elharo force-pushed the fix-370-pattern-compile-static branch from 137b860 to 3acd3c4 Compare July 2, 2026 16:46
@elharo elharo requested a review from slachiewicz July 2, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pattern.compile() called on every invocation of handleSpecificationEntries

1 participant