Skip to content

feature(api): Skip style builder creation on merge - #1219

Merged
kezz merged 2 commits into
main/4from
fix/dont-create-builder
Apr 24, 2025
Merged

kezz merged 2 commits into
main/4from
fix/dont-create-builder

Conversation

@kezz

@kezz kezz commented Apr 22, 2025

Copy link
Copy Markdown
Member

mergeStyle is called a lot, especially in TranslatableComponentRenderer, where there is no merging to be done. By skipping the creation of the builder if the merge is a no-op, we can save some allocations.

`mergeStyle` is called a lot, especially in TranslatableComponentRenderer, where there is no merging to be done. By skipping the creation of the builder if the merge is a no-op, we can save some allocations.
Comment thread api/src/main/java/net/kyori/adventure/text/AbstractComponentBuilder.java Outdated
@kezz
kezz added this pull request to the merge queue Apr 24, 2025
Merged via the queue into main/4 with commit 14fb879 Apr 24, 2025
@kezz
kezz deleted the fix/dont-create-builder branch April 24, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants