Skip to content

Optimize ChangePropertyKey#6622

Merged
knutwannheden merged 3 commits intomainfrom
optimize-change-property-key
Jan 28, 2026
Merged

Optimize ChangePropertyKey#6622
knutwannheden merged 3 commits intomainfrom
optimize-change-property-key

Conversation

@knutwannheden
Copy link
Copy Markdown
Contributor

@knutwannheden knutwannheden commented Jan 28, 2026

Avoid many repeated Pattern allocations. By providing a lazily created and cached Pattern inside a new NameCaseConvention.Compiled object this is now addressed. This mechanism is also used by a few other similar recipes.

Avoid many repeated `Pattern` allocations.
Comment thread rewrite-yaml/src/main/java/org/openrewrite/yaml/ChangePropertyKey.java Outdated
Comment thread rewrite-yaml/src/main/java/org/openrewrite/yaml/ChangePropertyValue.java Outdated
Comment thread rewrite-yaml/src/main/java/org/openrewrite/yaml/search/FindProperty.java Outdated
Comment thread rewrite-yaml/src/main/java/org/openrewrite/yaml/search/FindProperty.java Outdated
@knutwannheden knutwannheden merged commit e94d36f into main Jan 28, 2026
2 checks passed
@knutwannheden knutwannheden deleted the optimize-change-property-key branch January 28, 2026 10:01
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant