[
https://issues.apache.org/jira/browse/WICKET-6960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17501463#comment-17501463
]
ASF GitHub Bot commented on WICKET-6960:
----------------------------------------
theigl opened a new pull request #501:
URL: https://github.com/apache/wicket/pull/501
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Reduce allocations when encoding ComponentInfo
> ----------------------------------------------
>
> Key: WICKET-6960
> URL: https://issues.apache.org/jira/browse/WICKET-6960
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-core
> Affects Versions: 9.8.0
> Reporter: Thomas Heigl
> Assignee: Thomas Heigl
> Priority: Minor
> Attachments: image-2022-03-04-18-54-47-423.png
>
>
> Our profiler shows a significant amount of allocations coming from
> {{ComponentInfo.encodeComponentPath}}:
> !image-2022-03-04-18-54-47-423.png!
> We know the exact length of the strings we are encoding and decoding, so
> pre-sizing the {{StringBuilder}} should be an easy improvement.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)