[ 
https://issues.apache.org/jira/browse/WICKET-6824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204681#comment-17204681
 ] 

ASF subversion and git services commented on WICKET-6824:
---------------------------------------------------------

Commit 7cd6e183f10de9b2ef8959095d63065b797c29c5 in wicket's branch 
refs/heads/wicket-8.x from Thomas Heigl
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=7cd6e18 ]

WICKET-6824 Replace slow `String.format` with concatenation

This closes #449

(cherry picked from commit ad5e81b83b49ba1b58945cb14df1a63fa508f44a)


> Use concatenation instead of String.format for frequently called methods
> ------------------------------------------------------------------------
>
>                 Key: WICKET-6824
>                 URL: https://issues.apache.org/jira/browse/WICKET-6824
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core
>    Affects Versions: 9.0.0
>            Reporter: Thomas Heigl
>            Assignee: Thomas Heigl
>            Priority: Minor
>             Fix For: 9.1.0
>
>         Attachments: image-2020-08-30-20-34-57-261.png, 
> image-2020-08-30-20-35-04-970.png
>
>
> Two usages of {{String.format}} frequently show up in my production profiler:
> !image-2020-08-30-20-34-57-261.png!
> !image-2020-08-30-20-35-04-970.png!
> Both methods are potentially called dozens or even hundreds of times for 
> large pages.
> {{String.format}} has horrible performance and should mostly be used for 
> generating error messages and debug information. For a detailed analysis see: 
> [https://redfin.engineering/java-string-concatenation-which-way-is-best-8f590a7d22a8]
> We should replace {{String.format}} with simple concatenation in both 
> instances.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to