[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-824?pag...
]
Sanne Grinovero commented on HSEARCH-824:
-----------------------------------------
some considerations now that I'm fresh from it:
* consider class hierarchies, you likely don't want to split a parent/child between
threads
* it might be easy to implement by creating the IndexManager in an executor, while the
DocumentBuilder receives a "lazy reference" to the index manager as it
doesn't need it before the SearchFactory finishes the start cycle.
The get/put operations would need to work on atomic operations and make sure there are no
duplicates.
Run in parallel some of the engine initialization
-------------------------------------------------
Key: HSEARCH-824
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-824
Project: Hibernate Search
Issue Type: Improvement
Reporter: Emmanuel Bernard
In IndexManagerHolder.buildEntityIndexBinding we currently synchronize. But the critical
part is only between
indexManagersRegistry.get( providerName )
indexManagersRegistry.put( providerName, indexManager )
Even that does a lot of work.
We could parallelize the creation of EntityIndexBinder:
* synchronize this small piece described above
* move indexManager.initialize out of the sync block and be executed by
ServiceFactoryBuilder#initDocumentBuilders (the caller of
IndexManagerHolder.buildEntityIndexBinding)
* in ServiceFactoryBuilder#initDocumentBuilders run the various phases in parallel with
a ExecutorService (ie build EntityindexBinder, initialize IndexManagers, build
DocumentBuilder etc)
If class > 10 - number to refine, split the work.
This can be done by a community member but it's not a trivial task
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira