[b]Hibernate version: 2.1.6[/b]
Hello,
I've been using hibernate for abour 2 year of so, without many problems. The project I am on now requires us to retrieve up up to 15000 object per query. The app centers around querying this data, so we may need to raise the limt to 10s of thousands.
Anyway, it was taking at least 10-20 seconds per query of 7500. Long story short, I solved to problem by busting into the code to where the objects are created. If I am loading this master data class, I would short cut to a class i wrote to read from the result set and set the properties of my new class directly, avoiding the reflection.
With this modification I can load 80k object in about 20 seconds, or so the typical query of 10,000 or so is a manageable couple sec.
So I feel fairly confident that the CGLib reflection is where the time was spent.
Is there a good way to do this?
While I'm happy it works, and I encapsulated the code as much as possible, it still sucks, and is fairly brittle. If I upgrade to hib3 I have to redo. I can live with updating my "Custom Hydrator" since it is only for one of the classes.
Thanks for you help,
Nick
|