[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1775) collection batch fetching

Guenther Demetz (JIRA) noreply at atlassian.com
Tue Jun 21 08:01:55 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42686#action_42686 ] 

Guenther Demetz commented on HHH-1775:
--------------------------------------

I agree, the collection batch fetching algorithm must be reviewed. As it is implemented now, it gains performance only on small persistent contexts. As soon you have some hundred persistent collections in the context, BetchFetchQueue.getCollectionBatch() does take more time to calculate the batch than it would cost to execute the queries without batch fetching.

> collection batch fetching
> -------------------------
>
>                 Key: HHH-1775
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1775
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>            Priority: Minor
>             Fix For: hql+collection
>
>
> I have code local on my box to support "peeking" into the second level cache when determining whether to add a particular entity/collection key to a batch load request.  If the given key is contained in the second level cache, then do not batch fetch the entity/collection as it will be initialized from second level cache on access.
> However, there are still large inefficiencies when performing this for collections; the biggest of which currently is the fact that we retreive a IdentityMap.entrySet for each and ever call to determine a collectiomn fetch batch.  For performance reasons, we should align this with how entity batches are handled where the entity keys considered to be "batch loadable" are tracked seperately on the BatchFetchQueue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list