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

Uwe Schindler commented on LUCENE-4474:
---------------------------------------

We should do this check in all cases! If there is only <=1 entry in the map, we 
don't need to do anything (because this is the live thread!).
                
> CloseableThreadLocal maybePurge could be too expensive
> ------------------------------------------------------
>
>                 Key: LUCENE-4474
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4474
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>
> Was doing some tests with geonames database (19 fields, just using 
> StandardAnalyzer), and noticed this in the profiler.
> It could be a ghost, but we should investigate anyway.
> It seems ridiculous for a situation like mine:
> * indexing with one thread
> * every 40 Analyzer.tokenStream() calls [basically every other doc], this 
> thing is called
> * it gets iterators over the map, checks threads, this and that. but of 
> course there is only one thread! 
> Maybe its a good idea if it checks size() first or something. at least dont 
> do this stuff if size() == 1, as I bet a lot of people index with a single 
> thread. 
> Or maybe all this stuff is really cheap and its just a ghost.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to