Dear all,
sorry im new to hibernate but i have a big problem. i'm working on an analysis tool which analyse sourcecode. The programm build a complete analysis and then the analysis is writen in the database.
actually the analysis works fine for small projects. but if we have a huge projekt the analysis takse ca.4:30 hours. after a codeinspection i found out that the moste time is used by the HibernateHandler to update the database.
so my problem is to fill up the database.
"public final class HibernateHandler implements PersistenceHandler" is the class used to persists the datamodel.
this is the update function
Code:
public void update(final Object object) {
final Session s = SESSION_FACTORY.openSession();
final Transaction transaction = s.beginTransaction();
s.update(object);
transaction.commit();
s.close();
}
this is the save function
Code:
public void save(final Object object) {
final Session s = SESSION_FACTORY.openSession();
final Transaction transaction = s.beginTransaction();
s.save(object);
transaction.commit();
s.close();
}
the object is a complete analysis. and this object is big.
is there a fast way to fill up the database with a complex object?
i hope someone can help me.