-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: For each loop tuning possibilities
PostPosted: Fri Sep 18, 2015 4:19 pm 
Newbie

Joined: Fri Sep 18, 2015 4:07 pm
Posts: 1
Hello, I am trying to understand how hibernate works behind the scenes concerning for each loops. I am able to retrieve and iterate a list of objects with little overhead but when I start a nested loop that iterates a list of objects that is an attribute of the original object, the performance degrades substantially even if there are only two elements in the list. I was looking for any suggestions for perhaps improving this or an explanation of how hibernate handles loops?

for ( CriteriaSet scs : setsWithRegisteredCriteria ) { // this iterates 13k objects with no problem
List<CriteriaObj> searchCrit = scs.getSearchItems();
for ( CriteriaObj searchCriteria : searchCrit ) { // This loop instantly adds significant time even if there is only one item in the searchCrit list
}
}


Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.