lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7419) performance bug in tokenstream.end()
Date Fri, 19 Aug 2016 12:52:20 GMT


Adrien Grand commented on LUCENE-7419:

I was just curious to understand whit made hotspot unhappy since this the getAttribute call
did not seem to be much of an issue is the case the field is a string rather than opaque bytes.
I agree the removal of this per-stream getAttribute call is a good move regardless.

> performance bug in tokenstream.end()
> ------------------------------------
>                 Key: LUCENE-7419
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Priority: Blocker
>             Fix For: master (7.0), 6.2.0
>         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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message