You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gc...@apache.org on 2016/03/21 19:52:45 UTC

lucene-solr:master: LUCENE-7115: Speed up FieldCache.CacheEntry toString by setting initial StringBuilder capacity

Repository: lucene-solr
Updated Branches:
  refs/heads/master cb1738360 -> 56292fd4e


LUCENE-7115: Speed up FieldCache.CacheEntry toString by setting initial StringBuilder capacity


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/56292fd4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/56292fd4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/56292fd4

Branch: refs/heads/master
Commit: 56292fd4efb1749533d5d7dcd7235ebe89187099
Parents: cb17383
Author: Gregory Chanan <gc...@cloudera.com>
Authored: Fri Mar 18 14:36:15 2016 -0700
Committer: Gregory Chanan <gc...@cloudera.com>
Committed: Mon Mar 21 11:51:49 2016 -0700

----------------------------------------------------------------------
 lucene/CHANGES.txt                                                | 3 +++
 .../misc/src/java/org/apache/lucene/uninverting/FieldCache.java   | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/56292fd4/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 46cddb2..26ef3e6 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -29,6 +29,9 @@ Optimizations
 * LUCENE-7097: IntroSorter now recurses to 2 * log_2(count) quicksort
   stack depth before switching to heapsort (Adrien Grand, Mike McCandless)
 
+* LUCENE-7115: Speed up FieldCache.CacheEntry toString by setting initial
+  StringBuilder capacity (Gregory Chanan)
+
 ======================= Lucene 6.0.0 =======================
 
 System Requirements

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/56292fd4/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java
----------------------------------------------------------------------
diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java b/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java
index 27d68e0..11185a9 100644
--- a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java
+++ b/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java
@@ -404,7 +404,7 @@ interface FieldCache {
     
     @Override
     public String toString() {
-      StringBuilder b = new StringBuilder();
+      StringBuilder b = new StringBuilder(250);
       b.append("'").append(getReaderKey()).append("'=>");
       b.append("'").append(getFieldName()).append("',");
       b.append(getCacheType()).append(",").append(getCustom());