Hello,

 

I am using POI to take an excel file and put it into a Mysql database using
hibernate.

 

I put a counter on the records going into the database and it starts off
fast but then slows to over 15 seconds a record and I cannot figure out why.

 

My code is basically this:

 

Public class DatabaseDump{

 

                @Inject

                Private Session _session;

 

                Public void onAction(){ //they hit the go button

                                Loop rows{

                                                _session.beginTransaction();

                                                Loop cells{

                                                                Fill the
object from the cells

 
_session.save(Object);

                                                }

 
_session.getTransaction().commit();

                                }

}

 

Everything works fine as in the database gets filled for the rows it has
completed but gradually slows to a crawl and at around 2700 records of 10500
records it's a record every 15 seconds.

 

I run the project under eclipse using Tomcat.  The memory starts at around
80mb and only goes up to around 110mb.

 

What am I doing wrong?

 

--James

 

 

Reply via email to