-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate
PostPosted: Thu Jul 14, 2005 8:05 am 
Newbie

Joined: Thu Jul 14, 2005 6:26 am
Posts: 2
Location: Trento (ITALY)
Hi all,

I'm working on a project where we need to access a pre-existing (complex) DB schema, which consists of about 3000 tables, with a huge number of foreign keys (I've also found circular referential constraints).

I needed to set the vm option -XX:PermSize=256m to be able to load the Configuration, and at the end (the application start), the heap size used by the jboss (4.0.2) VM was about 700MB.

Is there any way to reduce the Hibernate model footprint in memory?
Is it possible to "lazy" load the persistent classes of the model, only when they are used?

Any other idea is welcome..

Thanks
Sincerely

Dario

Hibernate version: 3.0.5


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 14, 2005 8:10 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
3000 tables ? nice ;)

And I guess those 3000 tables all need to be classes ?

There is no way of lazy loading the configuration.

700 MB sounds like a lot - do you remember to not keep the Configuration object around etc. ?

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Hibernate: huge database mapping (thousands tables)
PostPosted: Thu Jul 14, 2005 8:48 am 
Newbie

Joined: Thu Jul 14, 2005 6:26 am
Posts: 2
Location: Trento (ITALY)
Do you really think it's nice ;))? Basically it's a constraint to mantain compatibility with the existing product..

We are generating (with a modified hibernate-tools to help us managing the problems related to key-many-to-one Property) the entire persistent layer and, in the meanwhile, we are designing the Models to be used in the new application, that will be persisted (on the actual database) using the Hibernate ORM layer. The persistency of the Models will be managed by VirtualDAO, that will use DAOs for the generated hibernate persistent classes.

The 700MB is just the result of the instantiation of a new configuration and the opening of a Session in a Servlet created with the only purpose to check the memory consumption.

Moreover.. 3000 is the result of 4500 (total) tables minus 1500 unnecessary entities (views, "shadow" tables).

One of the ideas I had is to "drop" possibly unused bidirectional mappings, in order to reduce the in-memory model footprint. Do you think this should help? (we are going to work on the hibernate-tools again to reach this goal)

Thanks

Dario


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.