mirror of
https://github.com/apache/lucene.git
synced 2025-02-15 06:25:56 +00:00
LUCENE-2556: Improve memory usage after cloning CharTermAttribute
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1024408 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6f66858572
commit
9221bfbfab
@ -745,6 +745,9 @@ Optimizations
|
||||
* LUCENE-2098: Improve the performance of BaseCharFilter, especially for
|
||||
large documents. (Robin Wojciki, Koji Sekiguchi, Robert Muir)
|
||||
|
||||
* LUCENE-2556: Improve memory usage after cloning (Char)TermAttribute.
|
||||
(Adriano Crestani via Uwe Schindler)
|
||||
|
||||
Build
|
||||
|
||||
* LUCENE-2124: Moved the JDK-based collation support from contrib/collation
|
||||
|
@ -203,7 +203,8 @@ public class CharTermAttributeImpl extends AttributeImpl implements CharTermAttr
|
||||
public Object clone() {
|
||||
CharTermAttributeImpl t = (CharTermAttributeImpl)super.clone();
|
||||
// Do a deep clone
|
||||
t.termBuffer = termBuffer.clone();
|
||||
t.termBuffer = new char[this.termLength];
|
||||
System.arraycopy(this.termBuffer, 0, t.termBuffer, 0, this.termLength);
|
||||
return t;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user