I have a performance question. I've used Hibernate in the past, but wanted to revisit some newer parts, so I was messing around with the eg example. I saw the "slow" and "fast" techniques for viewing all auctions. The difference in behavior makes sense.. with the fast technique instantiating a new object that doesn't carry any overhead with it, no relationships, or anything else.
The confusing thing for me is that the slow technique returns much faster for me running that test.
My initial assumption is that the difference is due to the first aproach returning items in cache, whereas the "fast" technique needs to create new objects. I'm not sure if this is accurate though.
I'm using Hibernate 2.1 with MySQL, and using a slightly modified eg/Auction example. (The modification is adding timing into the code before/after methods for looking at execution time..)
So, why would I see this behavior? Perhaps its just opposite-day on my computer..
thanks!
|