[
https://issues.apache.org/jira/browse/WICKET-7046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714029#comment-17714029
]
ASF subversion and git services commented on WICKET-7046:
---------------------------------------------------------
Commit 0fdde8d77a7e67144cb1ad1b5ec8934ff2f16b47 in wicket's branch
refs/heads/master from Thomas Heigl
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=0fdde8d77a ]
WICKET-7046 Avoid allocating `StringResponse` when no response filters are
active (#578)
> Avoid allocating StringResponse when no response filters are active
> -------------------------------------------------------------------
>
> Key: WICKET-7046
> URL: https://issues.apache.org/jira/browse/WICKET-7046
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-core
> Affects Versions: 9.12.0
> Reporter: Thomas Heigl
> Assignee: Thomas Heigl
> Priority: Major
>
> AjaxRequestHandler#respond currently always allocates a new StringResponse:
> {code:java}
> final StringResponse bodyResponse = new StringResponse();
> update.writeTo(bodyResponse, encoding);
> CharSequence filteredResponse = invokeResponseFilters(bodyResponse);
> response.write(filteredResponse);
> {code}
> Wrapping the response in a StringResponse is necessary for applying
> ResponseFilters that potentially modify the response.
> The thing is this: By default, a Wicket application running in deployment
> mode, does *not* have any response filters active. So in that case, we can
> avoid all of this expensive buffering.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)