• Post Reply Bookmark Topic Watch Topic
  • New Topic

StringBuff/Vector perf on Solaris  RSS feed

 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a string parsing program which uses a lot of StringBuffer and vectors.
This program is supposed to parse the message sent in a predefined structure
and store it in object form in vectors.
On sending a message of say 10,000 lines and eac line apprx containing say 50 bytes,on WIN NT system I am getting o/p in terms of millisecs.
But while running the same class on Solaris machine we get the time as 4 mins.
Fail to understand why this should happen.
Can anybdy help???
thanks,
Chinmay
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's pretty bad performance. What JVM are you using?
 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On giving "java -version"
I got this,
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
On the Win 2000 machine I get
java version "1.4.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_02-b02)
Java HotSpot(TM) Client VM (build 1.4.0_02-b02, mixed mode)
Will that be an issue here?
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chinmay Bajikar:

Will that be an issue here?

Shouldn't be that big a difference. Are the computers equivalent in terms of processor power, memory and idle load (i.e. the Solaris box isn't swamped before you run your Java app)?
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thought of something else. Are you printing a bunch of stuff to the console? Are you telneting to your solaris box? The difference between what you see on the Solaris and NT machines would be the network latency caused by the telnet, not the JVM performance.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a bug in which 1.4.1 StringBuffers may use significantly more memory than in 1.4.0. Looks like it was fixed in 1.4.2 - try upgrading to that and see if that helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!