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

Shai Erera commented on LUCENE-4156:
------------------------------------

I think that we can remove the synchronized from getSize() and change nextID to 
either volatile, or AtomicInteger. getSize() is not only public API used by 
applications, but getParent() uses it too.

Eliminating synchronization is good !
                
> Improve implementation of DirectoryTaxonomyWriter.getSize()
> -----------------------------------------------------------
>
>                 Key: LUCENE-4156
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4156
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Sivan Yogev
>            Assignee: Shai Erera
>            Priority: Minor
>
> Current implementation of DirectoryTaxonomyWriter.getSize() is synchrionized 
> and invokes indexWriter.maxDoc(), both harming performance.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to