lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-2401) Improve performance of CharTermAttribute(Impl) and also fully implement Appendable
Date Tue, 04 May 2010 11:30:55 GMT

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

Uwe Schindler updated LUCENE-2401:
----------------------------------

    Fix Version/s: 4.0.0

> Improve performance of CharTermAttribute(Impl) and also fully implement Appendable
> ----------------------------------------------------------------------------------
>
>                 Key: LUCENE-2401
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2401
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0.0
>
>         Attachments: LUCENE-2401.patch, LUCENE-2401.patch, LUCENE-2401.patch
>
>
> The Appendable.append(CharSequence) method in CharTermAttributes is good for general
use. But like StringBuilder has for some common use cases specialized methods, this does the
same and adds separate append methods for String, StringBuilder and CharTermAttribute itsself.
This methods enable the compiler to directly link the specialized methods and don't use the
instanceof checks. The unspecialized method only does the instanceof checks for longer CharSequences
(>8 chars), else it simply iterates.
> This patch also fixes the required special "null" handling. append() methods are required
by Appendable to append "null", if the argument is null. I dont like this, but its required.
Maybe we should document, that we dont dont support it. Otherwise, JDK's formatter fails with
formatting null.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message