Skip to content

WICKET-6960 Avoid allocations when decoding and encoding ComponentInfo#501

Merged
theigl merged 1 commit intoapache:masterfrom
theigl:WICKET-6960-component-info-allocations
Mar 6, 2022
Merged

WICKET-6960 Avoid allocations when decoding and encoding ComponentInfo#501
theigl merged 1 commit intoapache:masterfrom
theigl:WICKET-6960-component-info-allocations

Conversation

@theigl
Copy link
Contributor

@theigl theigl commented Mar 4, 2022

This PR includes some micro optimizations for ComponentInfo:

  • Pre-size StringBuilders when encoding and decoding component paths
  • Return empty component path without further allocations

Pre-sizing the StringBuilder is about 10% faster if the path is longer than 16 characters.

https://issues.apache.org/jira/browse/WICKET-6960

@theigl theigl added the java Pull requests that update Java code label Mar 4, 2022
@theigl theigl self-assigned this Mar 4, 2022
@theigl theigl merged commit d902cdb into apache:master Mar 6, 2022
@theigl theigl deleted the WICKET-6960-component-info-allocations branch March 6, 2022 11:35
theigl added a commit that referenced this pull request Mar 6, 2022
@dashorst dashorst mentioned this pull request Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants