You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/02/23 14:21:44 UTC

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

    [ https://issues.apache.org/jira/browse/LUCENE-7419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880500#comment-15880500 ] 

ASF subversion and git services commented on LUCENE-7419:
---------------------------------------------------------

Commit 4dbaed52a0a721b2b9668ee8074da42585fd54ea in lucene-solr's branch refs/heads/branch_5_5 from [~rcmuir]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4dbaed5 ]

LUCENE-7419: Don't lookup PositionIncrementAttribute every time in TokenStream.end()


> 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
>            Priority: Blocker
>             Fix For: master (7.0), 6.2, 5.5.5
>
>         Attachments: LUCENE-7419.patch
>
>
> 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.15#6346)

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