From c15a612b8abec6cca4e50f44efe1e2c497c6f691 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sat, 9 Oct 2010 04:06:03 +0200 Subject: [PATCH] optimize get/delete/index response xcontent generation --- .../elasticsearch/action/get/GetResponse.java | 26 +++++++++++-------- .../indices/delete/RestDeleteIndexAction.java | 12 ++++++--- .../rest/action/index/RestIndexAction.java | 17 +++++++++--- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java index a1a14d56ecc..93d8e2ddafb 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java @@ -27,10 +27,7 @@ import org.elasticsearch.common.compress.lzf.LZFDecoder; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Streamable; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentParser; +import org.elasticsearch.common.xcontent.*; import org.elasticsearch.rest.action.support.RestXContentBuilder; import java.io.IOException; @@ -219,24 +216,31 @@ public class GetResponse implements ActionResponse, Streamable, Iterable