[ 
http://issues.apache.org/jira/browse/LUCENE-438?page=comments#action_12330320 ] 

Yonik Seeley commented on LUCENE-438:
-------------------------------------

As expected, I haven't been able to find a performance difference after 
applying this patch with 1.4.2 or 1.5 JVMs.

java5 -server 10000000 TokCreate
time=10636
time=10636
time=10575
time=10705
time=10706

java5 -server 10000000 TokCreate  // Token patch applied (non-final)
time=10595
time=10516
time=10575
time=10515
time=10525

java5 -server 2000000 TokChain 
time=9484
time=9473
time=9514
time=9494
time=9502

java5 -server 2000000 TokChain  // Token patch applied (non-final)
time=9494
time=9434
time=9444
time=9443
time=9444

java4 -server 10000000 TokCreate
time=9294
time=9323
time=9274
time=9344
time=9384

java4 -server 10000000 TokCreate  // Token patch applied (non-final)
time=9254
time=9233
time=9283
time=9283
time=9224

java4 -server 2000000 TokChain
time=7150
time=7171
time=7171
time=7120
time=7160

java4 -server 2000000 TokChain // Token patch applied (non-final)
time=7101
time=7150
time=7140
time=7160
time=7110

java5 -client 10000000 TokCreate  
time=23384
time=23253
time=23534

java5 -client 10000000 TokCreate  // Token patch applied (non-final)
time=23373
time=23694
time=23384


> add Token.setTermText(), remove final
> -------------------------------------
>
>          Key: LUCENE-438
>          URL: http://issues.apache.org/jira/browse/LUCENE-438
>      Project: Lucene - Java
>         Type: Improvement
>     Versions: CVS Nightly - Specify date in submission
>     Reporter: Yonik Seeley
>     Priority: Minor
>  Attachments: yonik_Token.txt
>
> The Token class should be more friendly to classes not in it's package:
>   1) add setTermText()
>   2) remove final from class and toString()
>   3) add clone()
> Support for (1):
>   TokenFilters in the same package as Token are able to do things like 
>    "t.termText = t.termText.toLowerCase();" which is more efficient, but more 
> importantly less error prone.  Without the ability to change *only* the term 
> text, a new Token must be created, and one must remember to set all the 
> properties correctly.  This exact issue caused this bug:
> http://issues.apache.org/jira/browse/LUCENE-437
> Support for (2):
>   Removing final allows one to subclass Token.  I didn't see any performance 
> impact after removing final.
> I can go into more detail on why I want to subclass Token if anyone is 
> interested.
> Support for (3):
>   - support for a synonym TokenFilter, where one needs to make two tokens 
> from one (same args that support (1), and esp important if instance is a 
> subclass of Token).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to