Hi,
I am new to hibernate and am trying to import a big xml file with hierarchical data into classes persisted by hibernate.
During import I need the parent of each node. The time used for session.get(parentid) increases dramatically over time. When I start the import it takes approx. 20ms per node and after having imported 8000 nodes it takes 500 ms and more. Importing 120000 nodes takes forever.
When using a homebrew HashMap that maps the parentid to the node object the time per node is constantly around 10ms!
Aren't oscache/ehcache using HashMaps as well? How come there is that big performance difference that increases over time?
Thanks for help,
Ralf
|