[jira] Updated: (LUCENE-2556) CharTermAttribute cloning memory consumption

2010-07-22 Thread Adriano Crestani (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-2556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adriano Crestani updated LUCENE-2556:
-

Attachment: CharTermAttributeMemoryConsumptionDemo.java

This java application demonstrates how much memory 
CharTermAttributeImpl.clone() might consume in some scenarios.

 CharTermAttribute cloning memory consumption
 

 Key: LUCENE-2556
 URL: https://issues.apache.org/jira/browse/LUCENE-2556
 Project: Lucene - Java
  Issue Type: Improvement
  Components: Analysis
Affects Versions: 3.0.2
Reporter: Adriano Crestani
Priority: Minor
 Fix For: 3.1

 Attachments: CharTermAttributeMemoryConsumptionDemo.java


 The memory consumption problem with cloning a CharTermAttributeImpl object 
 was raised on thread http://markmail.org/thread/bybuerugbk5w2u6z

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] Updated: (LUCENE-2556) CharTermAttribute cloning memory consumption

2010-07-22 Thread Adriano Crestani (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-2556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adriano Crestani updated LUCENE-2556:
-

Attachment: lucene_2556_adriano_crestani_07_23_2010.patch

This patch optimizes the cloning of the CharTermAttributeImpl internal buffer. 
It keeps using clone() to clone the internal buffer when 
CharTermAttribute.length() is at least 150 and at least 75% and  of the 
internal buffer length, otherwise, it uses System.arrayCopy(...) to clone it 
using CharTermAttribute.length() as the new internal buffer size.

It's performing the optimization, because in some scenarios, like cloning long 
arrays, clone() is usually faster than System.arrayCopy(...). 

 CharTermAttribute cloning memory consumption
 

 Key: LUCENE-2556
 URL: https://issues.apache.org/jira/browse/LUCENE-2556
 Project: Lucene - Java
  Issue Type: Improvement
  Components: Analysis
Affects Versions: 3.0.2
Reporter: Adriano Crestani
Priority: Minor
 Fix For: 3.1

 Attachments: CharTermAttributeMemoryConsumptionDemo.java, 
 lucene_2556_adriano_crestani_07_23_2010.patch


 The memory consumption problem with cloning a CharTermAttributeImpl object 
 was raised on thread http://markmail.org/thread/bybuerugbk5w2u6z

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] Updated: (LUCENE-2556) CharTermAttribute cloning memory consumption

2010-07-22 Thread Uwe Schindler (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-2556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe Schindler updated LUCENE-2556:
--

Attachment: LUCENE-2556.patch

Here the patch, I see no problem with applying it to 3.x and trunk.

 CharTermAttribute cloning memory consumption
 

 Key: LUCENE-2556
 URL: https://issues.apache.org/jira/browse/LUCENE-2556
 Project: Lucene - Java
  Issue Type: Improvement
  Components: Analysis
Affects Versions: 3.0.2
Reporter: Adriano Crestani
Priority: Minor
 Fix For: 3.1

 Attachments: CharTermAttributeMemoryConsumptionDemo.java, 
 LUCENE-2556.patch, lucene_2556_adriano_crestani_07_23_2010.patch


 The memory consumption problem with cloning a CharTermAttributeImpl object 
 was raised on thread http://markmail.org/thread/bybuerugbk5w2u6z

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org