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

Michael McCandless commented on LUCENE-7419:
--------------------------------------------

I tested indexing all geonames, using lucene server 
(https://github.com/mikemccand/luceneserver) and this patch gets a ~5% speedup:

{noformat}
  before: Total: 426514.0 docs/sec for 26.1 sec
   after: Total: 447550.4 docs/sec for 24.8 sec
{noformat}

This is on an 8 core box, so it's nice to confirm I can see a speedup not just 
on the crazy 72 core box.

> 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.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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to