SOLR-4227: Wrap XML RequestWriter's OutputStreamWriter in a BufferedWriter to avoid frequent converter invocations

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1565099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-02-06 07:50:17 +00:00
parent 3b43c10bd1
commit 95610a8c58
2 changed files with 4 additions and 1 deletions

View File

@ -307,6 +307,9 @@ Optimizations
* SOLR-5214: Reduce memory usage for shard splitting by merging segments one
at a time. (Christine Poerschke via shalin)
* SOLR-4227: Wrap XML RequestWriter's OutputStreamWriter in a BufferedWriter
to avoid frequent converter invocations. (Conrad Herrmann, shalin)
Other Changes
---------------------

View File

@ -69,7 +69,7 @@ public class RequestWriter {
public void write(SolrRequest request, OutputStream os) throws IOException {
if (request instanceof UpdateRequest) {
UpdateRequest updateRequest = (UpdateRequest) request;
OutputStreamWriter writer = new OutputStreamWriter(os, UTF_8);
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, UTF_8));
updateRequest.writeXML(writer);
writer.flush();
}