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

This commit is contained in:
Gregory Chanan 2016-03-18 14:36:15 -07:00
parent cb1738360e
commit 56292fd4ef
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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());