How to improve the speed of my software project?

I am doing a school programming project with my Java classmates. We store information on a remote db.

When we launch the application, we extract all the information from the database and convert it into objects that will be used in our application (using java sql statemens). In the application, we edit some of these objects, and then when we exit the application we save or update information in the database using Hibernate.

As you can see, we do not use Hibernate to obtain information, we use it only for saving and updating.

We have 2, but very similar problems. Loading an object (when we launch the application) and saving objects (with Hibernate) in db (when the application is closed) takes too much time. And our project is not a huge corporate application, its a rather small application, we just manage some students, teachers, homework and tests. So our db is also very small. How can we increase productivity?

later: if we use a local database, it works very fast, it just works slowly in remote databases

+5
source share
11 answers

, , ? , , ( Hibernate, , - , )? , , .

, , - -, , / , .

+7

2 :

, ( java sql statemens). , , , , .

, , ?

, . Hibernate , Hibernate CRUD (, , , ). , , .

, , , . ? ? ?

- . Hibernate db? getHibernateTemplate(), .save entity.update ? , , Hibernate , . , , ( , ). , , show_sql P6Spy, , .

+4

, , .

, / , , , aperkins.

, , ? , , , .

+2

- / . , . : -, ? -, ? 10/100/1000? 10 20% - , .

, , , " ". . , , , .

, . , , .

+2

. . Hibernate. EhCacheProvider.

hibernate.xml:      net.sf.ehcache.hibernate.EhCacheProvider  

, ehcache.xml:                    

cache.jar hibernate . . , ( ).

0
  • SQL-, .
  • , , .
  • , ?
  • ping - .
0

, , :

  • : ( )
  • : , . DAL:

hibernate.batch_size.

, , ( sql-), . , , 10 RTT), .

0

, :

0

?

1 . Thread 2 .

.

0

:

(), , , -, . , , - , , . - , , . , .

, , , , , -, " " ".

, , , , SO. , , - , .

, , , Java.

0

. . :

LOAD. Hibernate Lazy Fetching. SAVE. , , . , .

It struck me how well everything went. The amount of new code we had to write was very small.

0
source

All Articles