• Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance 1.2 to 1.3  RSS feed

 
Carlos A. Perez
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:

I have an application that we are migrating from 1.2 to 1.3 we thougth that the change of versi�n would improve the performance but not.

The application is a fat client (AWT/Swing). In some test we get that in 1.2 takes 9 seconds to complete the task and in 1.3 the worse time was arround 20 seconds!!

I have test the app with some javac and java options but the results are similar.

�Is the JVM 1.3 slower than 1.2??? �Wasnt it suppose that new VM are faster than older? �whats happenning?
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is at the root of what I am dealing with in designing my app.

In general, moving up from a lowerversion to higherversion will not improve performance unless the shop definition of performance is achieving better productivity using the goals and methods of Object Oriented, UML, JDBC and tools of that nature which have as their design intent achieving productivity on large-scale code base(s).

There are a number of people here who are very well conversant in not only AWT/Swing, and other technologies, but can as well spot likely candidate areas for improvement if you will tell us more about what your app is supposed to do and how the original design evolved.

 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually... as a general rule, upgrading to a new major JDK revision will improve the performance of most applications without changing (or recompiling) your code. The virtual machine technology continues to improve, especially the dynamic recompilation part and the memory management. An application that runs in twice the time would be quite unusual.

Whenever you have a performance issue, the first and most important thing to do is to make measurements. Have you used a code profiler to find out where all that time is going? You can't do anything about it until you find out what's going on. What sort of work is taking 9 seconds, anyway?
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, if you are doing an upgrade anyway why upgrade to 1.3. Why not 1.4, 1.5 or 1.6?
 
Carlos A. Perez
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First we detected performance problems in an specific point, we fixed it (the one i talked that took arround 20 seconds) it was a very poor programmed code.

BUT we still detect performance problems in general in all the application. (1.2 still runs faster in general)

This aplication is arround 17000 classes, we can not review all the code to fix bad code like we did in the code we fixed. Anyway badly or good programed its supposed to run faster with the new JVM.

Why not 1.4 o 1.5? They said that it was a lot of risk. So we did it first from 1.2 to 1.3

Do you think that any compiler option could help? which one?

It doesnt make sense to me that 1.3 runs slower.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are really no compiler options that affect optimization. It's possible that under 1.3 your program needs more memory -- perhaps it uses many copies of some API class that is larger in the new revision. You might try optimizing memory use/garbage collection:

http://java.sun.com/docs/hotspot/gc/
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why 1.4 or 1.5 are any more of a risk. I also believe some things like reflection had speed improvements in 1.4. Probably at least worth a recompile in these 2 see if it works, and is faster. Then use that info to decide if it is worth the 'risk'.

Can you tell what type of code is now slower? i.e. database calls? ejb's? everything?
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could take your jdk 1.2 and jdk 1.3 code and run the class files in jdk 1.5 and see if that helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!