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

ASF GitHub Bot commented on WICKET-7042:
----------------------------------------

martin-g commented on PR #573:
URL: https://github.com/apache/wicket/pull/573#issuecomment-1503662092

   No need to deprecate in 8.x
   
   On Tue, 11 Apr 2023 at 18:34, Thomas Heigl ***@***.***> wrote:
   
   > ***@***.**** commented on this pull request.
   > ------------------------------
   >
   > In
   > wicket-core/src/main/java/org/apache/wicket/response/StringResponse.java
   > <https://github.com/apache/wicket/pull/573#discussion_r1163001693>:
   >
   > > @@ -30,6 +30,8 @@
   >  public class StringResponse extends Response
   >  {
   >
   > +  private static final int DEFAULT_INITIAL_CAPACITY = 128;
   >
   > If we don't deprecate it in 8.x, we can simply cherry pick from master.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/wicket/pull/573#discussion_r1163001693>, or
   > unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/AABYUQUJNUMVRJAHJFJP2LLXAV2ZTANCNFSM6AAAAAAWZZLLDQ>
   > .
   > You are receiving this because you were mentioned.Message ID:
   > ***@***.***>
   >
   




> Improve sizing of StringResponse when writing scripts in PartialPageResponse
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-7042
>                 URL: https://issues.apache.org/jira/browse/WICKET-7042
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core
>    Affects Versions: 9.12.0
>            Reporter: Thomas Heigl
>            Assignee: Thomas Heigl
>            Priority: Major
>             Fix For: 10.0.0, 9.13.0
>
>
> When rendering scripts in PartialPageResponse, an AppendingStringBuilder with 
> initial capacity 1024 is created. This buffer is then written to a 
> StringResponse that uses a buffer with an initial capacity of 128 causing 
> unnecessary allocations.
> We should create the StringResponse with enough capacity to hold the scripts.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to