You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2016/08/18 21:31:21 UTC

[jira] [Created] (LUCENE-7419) performance bug in tokenstream.end()

Robert Muir created LUCENE-7419:
-----------------------------------

             Summary: performance bug in tokenstream.end()
                 Key: LUCENE-7419
                 URL: https://issues.apache.org/jira/browse/LUCENE-7419
             Project: Lucene - Core
          Issue Type: Bug
            Reporter: Robert Muir


TokenStream.end() calls getAttribute(), which is pretty costly to do per-stream.

It does its current hack, because in the ctor of TokenStream is "too early".

Instead, we can just add a variant of clear(), called end() to AttributeImpl. For most attributes it defers to clear, but for PosIncAtt it can handle the special case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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