Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-19-2008, 02:57 AM
Member
 
Join Date: Jul 2008
Posts: 3
coldnebo is on a distinguished road
performance problem on osx
Hi, I've been scouring google for any info on this, but haven't found anything. I'm hoping that maybe the odd java expert might know the reason for this...

Here's a simple profile done on my windows laptop (running cygwin):
$ time java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

real 0m0.560s
user 0m0.031s
sys 0m0.015s


Here's the same profile done on a dual G4 1GHZ mac server machine running leopard:

$ time java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

real 0m47.108s
user 0m0.114s
sys 0m0.275s



Can anyone tell me why the Mac is 46 seconds slower than pc (and linux) flavors of java?

I'm trying to port ant build scripts over, but if it takes so long just to start ant up, it will really slow down the development cycle on this machine -- I'd almost rather setup a linux box instead.

Thanks,
-lk
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-23-2008, 01:09 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,574
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
How about testing the same version on two environments. If you can just try, then we can have a discussion about this.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-31-2008, 10:09 PM
Member
 
Join Date: Jul 2008
Posts: 3
coldnebo is on a distinguished road
another comparison on Ubuntu, running against the 1.5.0_16 jre.

larry@clover:~/Desktop/jre1.5.0_16$ time bin/java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)

real 0m0.205s
user 0m0.064s
sys 0m0.064s

note: this is a virtual machine running under a windows host, so it's performance if anything should be much worse.

hotspot has worked fast for a long time on linux and windows, so I think there's something specific to the Apple implementation going on. Here's my top guesses...

1) the command line tools generally invoke the class loader on a as-needed basis so one guess is that the Mac version of hotspot preloads the native Cocoa libs on startup regardless of whether they are used.

But this doesn't sit well with experience... after all I saw more macs using java command line than you can shake a stick at, at places like JavaOne, etc. And that was all blazing fast.

So
#2) this mac is running leopard 10.5, but it's a dual G4. Could newly compiled java tools for leopard be intel binaries and somehow incurring a reverse emulation to older G4 hardware?

Anyway, these are just guesses. I hope maybe someone in the community knows gritty details about the mac implemented hotspot and java toolchain.

Thanks,
-lk
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-01-2008, 10:39 PM
Member
 
Join Date: Jul 2008
Posts: 3
coldnebo is on a distinguished road
ok, the platform does seem to have something to do with it.

I just got a macbook pro (personal laptop) intel core2 duo 2.4ghz, and I ran the same test.

build 1.5.0_13-b05-237
real: 0m0.565s

awesome.

So, maybe this is a problem with the binary translation layer ("Rosetta"?) going intel ==> g4

Sure seems spiffy on the intel hardware.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU performance getting affected peiceonly Lucene 2 10-06-2008 09:24 PM
Java Performance Ideas developer321 Advanced Java 4 06-28-2008 05:16 PM
Performance Plugin bugger Eclipse 0 01-31-2008 03:01 PM
Performance Of Collections thomasprabu Advanced Java 0 01-05-2008 12:17 PM
how to improve the performance of JWS? dinesh kaushik Java Applets 0 11-21-2007 09:46 AM


All times are GMT +3. The time now is 02:25 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org