 |
 |
Java JProgressBar Performance
|
 |
|
 |
|
Forum Regular
Join Date: Mar 2001
Location: Goodlettsville, TN USA
Status:
Offline
|
|
I developed a simple application that uses the JProgressBar on the main frame. When I run this application on Windows with J2SE 1.4.1_02 I dont' see any CPU hit while the application is idle. When I run this same application on Mac OSX with J2SE 1.4.1_02 my cpu utilization stays on average at 50% when the application is idle. I took out the JProgress bar and the CPU went to 1% to 0% during idle. Is this a bug? Or does anybody have any insight on this? Thanks for your help.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status:
Offline
|
|
I have plenty insight on this. I created a JFrame with two JProgressBars for my folding@home monitor and found that I had to change the look-and-feel to Java look-and-feel to allow it to perform properly on Mac OS X, due to CPU-intensive liquid effects.
Have you received a new version of Java? You list 1.4.1_02, which from what I've seen, isn't out--only 1.4.1_01 is available.
|
|
folding@home is good for you.
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Mar 2001
Location: Goodlettsville, TN USA
Status:
Offline
|
|
No I am using 1.4.1_01 just a type O sorry about that. So its the liquid effects doing this huh. I wonder if this has been brought to apple's attention yet. I'm surprised Sun isn't jumping on their back about this. Thanks for your help.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status:
Offline
|
|
You could try this code before building a swing frame to get the Java look-and-feel to test it yourself, if you like.
try {
UIManager.setLookAndFeel(UIManager.getCrossPlatfor mLookAndFeelClassName());
}
catch (Exception e) { }
That's opposed to UIManager.getSystemLookAndFeelClassName() for the native look-and-feel.
|
|
folding@home is good for you.
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2000
Location: DC Metro, USA
Status:
Offline
|
|
It's not just Java. One of my simple Carbon apps used about 35% of the CPU to pulse the default button. There was even a KB article about the problem at the time. It may have been fixed by now; I haven't done any programming recently.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status:
Offline
|
|
You're right of course. It happens anywhere there are liquid effects. There's no real way to fix something that is a feature of the operating system GUI.
They might slow the effect to lessen the impact, but it's going to be big regardless.
|
|
folding@home is good for you.
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: France
Status:
Offline
|
|
i can confirm that even in cocoa, NSProgressBar eats far too much CPU... (about 40% on my g4/400) just to have the nice flooding effect...
I had subclassed it to avoid the effects, it now eat quite less CPU (still high IMHO).
|
|
CarraFix, the traffic shaper for OS X !
Enjoy The [CFx] Community !
http://www.carrafix.com
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
Originally posted by altimac:
i can confirm that even in cocoa, NSProgressBar eats far too much CPU... (about 40% on my g4/400) just to have the nice flooding effect...
I had subclassed it to avoid the effects, it now eat quite less CPU (still high IMHO).
Why would it be so high? It seems like all it's doing it moving an image to the left repeatedly (I don't have one in front of me, so I could be misremembering it). Is it the smoothness of the animation? Is there some transparency in the effect?
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|