Thomas Heigl created WICKET-7046: ------------------------------------ Summary: 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
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)