Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Noticed a 25-30% decrease in performance going from 1.4.2 to 1.6  RSS feed

 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran some tests on some 1.4.2 code thinking that we might gain a performance boost by moving to 1.6, but to my the tests ran quite a bit slower!

I checked for uses of StringBuffer in my 1.6 version and removed those, but the results are still pretty bad. Using 1.4.2, the code averaged about 11600 milliseconds while the latest released version of 1.6 took about 15000 milliseconds to complete.

So, has anyone else seen this?

Besides StringBuffer, might there be a performance issue with other 1.6 versions of things like Pattern.matcher/find?

FWIW, the code tested is heavy into pattern matching.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't heard of performance problems with Pattern, but I suppose it's possible. However rather than speculating on where problems might be, it would be much more useful to use a profiler to measure where they actually are. Free profilers are available as part of NetBeans or JDeveloper, and probably other places. If you can identify which method calls have the greatest increase in execution time, that will help tremendously.
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jim Yingst:
I haven't heard of performance problems with Pattern, but I suppose it's possible. However rather than speculating on where problems might be, it would be much more useful to use a profiler to measure where they actually are. Free profilers are available as part of NetBeans or JDeveloper, and probably other places. If you can identify which method calls have the greatest increase in execution time, that will help tremendously.


I have Netbeans and have profiled the 1.6 version...the problem is that it does not work with Java 1.4

If someone knows of one that does that I can download, then I'll give it a shot!
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's hard to say without knowing more. Here are some comments on the matter of StringBuffer performance and it looks like it is ok in jdk 6.

http://www.herongyang.com/jvm/string_buffer.html
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it turns out it wasn't really pattern at all but a method I was calling written by third party that used Calendar and Date in a way in which 6.0 didn't care for too much!

Sun is looking into changing it for a future release.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!