-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate performance and FieldInterceptionHelper
PostPosted: Wed May 18, 2011 10:38 am 
Newbie

Joined: Wed May 18, 2011 9:36 am
Posts: 2
would you expect an application to spend a lot of time in FieldInterceptionHelper?

I have a new application built with jTDS, Hibernate 3.6.3, and Spring Data JPA 1.0.0M2.
The first step is to load some data into the database from flat files and it's taking longer than I expected.
I ran under VisualVM to get samples and found about 54% of my time (about 100s out of 185s) is spent in FieldInterceptionHelper.extractFieldInterceptor and FieldInterceptionHelper.isInstrumented.

I searched for an explanation and I think it's related to lazy loading but I can't find a definitive answer.

Can you tell me more about why an application would spend so much time in those methods?


Top
 Profile  
 
 Post subject: Re: hibernate performance and FieldInterceptionHelper
PostPosted: Thu May 19, 2011 7:45 am 
Newbie

Joined: Wed May 18, 2011 9:36 am
Posts: 2
well, I still don't understand what was going on with the FieldInterceptorHelper but I did improve the performance (down to 7s from 185s).

I enabled TRACE output and noticed that flushes were happening often and each one touched more entities than the previous one. I looked again at how I was saving things and changed my model a bit.

- I was including derived information in the tables; no need for that as that information is accessed rarely and can be derived in the domain objects.
- I was using JOINED inheritance which prevented batch inserts; I changed that to use TABLE_PER_CLASS.

I would still appreciate more information about the role of FieldInterceptionHelper and how it interacts with the EntityManager but it's not critical any more.

Thanks!


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

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.