Bugs item #569077, was opened at 2002-06-14 11:17 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=569077&group_id=22866
Category: JBossCMP Group: CVS HEAD Status: Open >Resolution: Fixed Priority: 5 Submitted By: Michael Newcomb (mnewcomb) Assigned to: Dain Sundstrom (dsundstrom) Summary: read-ahead issues Initial Comment: I'm submitting this to keep track of some issues that have arisen with the rewrite of the read-ahead code. Most of the problems I am encountering have to deal with very large sets of data (to the tune of 10k+ entity beans). I'm just gonna give a quick summary of the problems, but if you are interested in the details, I can forward the e-mail thread between Dain and myself discussing the problems. Summary: 1. Replacing FinderResults with a List indirectly causes a large amount of compares to occur when working with 'listMap' because FinderResults.equals was just doing identity comparison as opposed to List.equals which starts walking the list comparing values. 2. Relationship read-aheads and finder read-aheads share the same 'listMap'. So, if a bean is found in a read-ahead and then in a relationship, the results keep getting replaced with the last accessed one. Michael ---------------------------------------------------------------------- >Comment By: Dain Sundstrom (dsundstrom) Date: 2002-06-18 22:08 Message: Logged In: YES user_id=251431 Great patch. ---------------------------------------------------------------------- Comment By: Michael Newcomb (mnewcomb) Date: 2002-06-18 08:37 Message: Logged In: YES user_id=382427 Forget about the first patch. Here is a new patch which solves the performance problem. When finder results are added to the cache, dereferenced results are not longer resolved by walking the entire listMap. Instead, each PK in the dereferenced list is looked up to see if it references the list. The first key that still references the list cancels the lists dereferency (I know that is not a word). Michael ---------------------------------------------------------------------- Comment By: Michael Newcomb (mnewcomb) Date: 2002-06-17 13:08 Message: Logged In: YES user_id=382427 Ok. Here are the major things I did. 1. JDBCStoreManager used to just have one ReadAheadCache, now it has getEntityReadAheadCache and getRelatedReadAheadCache. All entity-based read-ahead finder results are placed in the EntityReadAheadCache and all relation-based read-ahead finder results are placed in the RelatedReadAheadCache. 2. I removed all references to the ListCache. I fail to see how the cache is getting used... All finder results were being put into the 'listMap' and therefore even if they were aged out of the 'listCache' they would still be in the 'listMap'. Furthermore, the cache was never accessed. The change to the JDBCStoreManager required a few changes to other classes: JDBCAbstractQueryCommand.java, JDBCLoadEntityCommand.java, JDBCLoadRelationCommand.java, JDBCRemoveEntityCommand.java, JDBCCMRFieldBridge.java. ---------------------------------------------------------------------- Comment By: Michael Newcomb (mnewcomb) Date: 2002-06-17 07:23 Message: Logged In: YES user_id=382427 Sure. ---------------------------------------------------------------------- Comment By: Dain Sundstrom (dsundstrom) Date: 2002-06-16 15:42 Message: Logged In: YES user_id=251431 You gonna work on this Micheal? =) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=569077&group_id=22866 ---------------------------------------------------------------------------- Bringing you mounds of caffeinated joy >>> http://thinkgeek.com/sf <<< _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
