Skip to main content

Swing is very very slow on fedora 5

24 replies [Last post]
keeskuip
Offline
Joined: 2003-06-17

Hallo,

I just installed fedora 5 and every swing application (for instance : java -jar SwingSet2.jar) is very, very slow.

revalidating any swing application drives the cpu to 100 % and it takes forever.

Has anybody noticed this already? Should I file a bugreport?

Kees.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
trembovetski
Offline
Joined: 2003-12-31

Yes, this last exception is a known bug, will be fixed in the next build (78).

Dmitri

trembovetski
Offline
Joined: 2003-12-31

Correction: it should be fixed in b80.

Bug:
6389798: GTK L&F: java.lang.IllegalArgumentException: Color parameter outside of expected range

Dmitri

mikael
Offline
Joined: 2004-03-04

It worked fine in KDE, however there were problems with Gnome. There were no apparent performance problems & I tested with the "Windows Preferences->Select windows when the mouse moves over them" on and off (no change except for JFileDialog).

Configuration:
Gnome - almost default, changed some font settings
FC 5 - Linux neoglyph 2.6.16-1.2064_FC5 #1 SMP Mon Mar 20 16:52:42 EST 2006 x86_64 x86_64 x86_64 GNU/Linux
AMD64 3500 with 3GB RAM

1. The window opens beneath my console.
2. Changing from Metal to GTK (standard FC5 theme) with the "Internal Frames Demo" tab selected throws an exception:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Red Green Blue
at java.awt.Color.testColorValueRange(Color.java:285)
at java.awt.Color.(Color.java:369)
at java.awt.Color.(Color.java:344)
at com.sun.java.swing.plaf.gtk.Metacity.parseColor(Metacity.java:1594)
at com.sun.java.swing.plaf.gtk.Metacity.drawTitle(Metacity.java:958)
at com.sun.java.swing.plaf.gtk.Metacity.draw(Metacity.java:1359)
at com.sun.java.swing.plaf.gtk.Metacity.drawInclude(Metacity.java:1311)
at com.sun.java.swing.plaf.gtk.Metacity.draw(Metacity.java:1333)
at com.sun.java.swing.plaf.gtk.Metacity.drawPiece(Metacity.java:1387)
at com.sun.java.swing.plaf.gtk.Metacity.paintFrameBorder(Metacity.java:4 28)
at com.sun.java.swing.plaf.gtk.GTKPainter.paintInternalFrameBorder(GTKPa inter.java:244)
at javax.swing.plaf.synth.SynthInternalFrameUI.paintBorder(SynthInternal FrameUI.java:176)
at javax.swing.plaf.synth.SynthBorder.paintBorder(SynthBorder.java:46)
at javax.swing.JComponent.paintBorder(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:968)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paint(JComponent.java:976)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paint(JComponent.java:976)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paint(JComponent.java:976)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paint(JComponent.java:976)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paint(JComponent.java:976)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paint(JComponent.java:976)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paint(JComponent.java:976)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:804)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5083)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManag er.java:279)
at javax.swing.RepaintManager.paint(RepaintManager.java:1105)
at javax.swing.JComponent.paint(JComponent.java:953)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java: 60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97 )
at java.awt.Container.paint(Container.java:1727)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:724)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:670)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:6 50)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System EventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre ad.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread. java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

keeskuip
Offline
Joined: 2003-06-17

Mikael,

Have you tried the "nv" driver in FC5?

You can change this by editing /etc/X11/xorg.conf and
changing the Driver parameter in Section "Device" to "nv"

Kees.

john_linuxuser
Offline
Joined: 2006-07-19

Dmitri,
I don't know if this helps. By accident, I discovered that if I upgrade FC4 to kernel-2.6.16-1.2115_FC4.i686.rpm (published in FC's update package http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/i386/)
, my java application immediately slows down to just as slow as FC5! Horrific bad stomach twisting feeling.

I reboot to kernel 2.6.11 (FC4's stock kernel), everythings goes normal again.

John

trembovetski
Offline
Joined: 2003-12-31

John, thanks a lot, the more data the better. Looks like some kind of conflict with the kernel, but I can't imagine why.

Dmtiri
(just back from vacation)

mikael
Offline
Joined: 2004-03-04

With the "nv" driver and GTK laf Swing is terrible slow. It's the Xorg process that is sucking up all the CPU. Metal LAF is fine. Seems equally slow on build 70.

trembovetski
Offline
Joined: 2003-12-31

FC5 uses a new X server, may be it broke something. We'll need to investigate.

Thanks,
Dmitri

byhisdeeds
Offline
Joined: 2006-01-06

I just upgraded to FC5 from FC4 by a fresh install and I have a similar problem. I have a Swing application that uses the synth look and feel and a jogl GLCanvas, and it sucks up the CPU randomly for long periods. Sometimes redrawing is fast, most times extremely slow (~10 secs). It only used to do this a few times under FC4.

I'm running mustang b-80 and jogl nighty builds, and the nvidia-1.0.8756-1.2.6.16_1.2080_FC5 drivers with the 2.6.16-1.2080_FC5 kernel.

Does anybody know of a solution or workaround.

trembovetski
Offline
Joined: 2003-12-31

Are you seeing this with non-jogl Swing applications as well?

Dmitri

byhisdeeds
Offline
Joined: 2006-01-06

No. I've tried other Swing apps and they don't give this problem. Its seems that the ones that use the GTK LookAndFeel (for example synth) exhibit this slowdown.

byhisdeeds
Offline
Joined: 2006-01-06

I just tried to run the SwingSet2.jar demo under FC4 and the color chooser demo runs with 50% CPU load with jdk 1.5.04. With mustang b80 it runs with near 100% CPU load.

trembovetski
Offline
Joined: 2003-12-31

Thanks for the update. So I understand that you have the Nvidia drivers installed (as opposed to the default ones which come with the distrubution), is that correct?

Thanks,
Dmitri

byhisdeeds
Offline
Joined: 2006-01-06

Yes I have the livna nvidia driver kmod-nvidia-1.0.8756-1.2.6.16_1.2096_FC5 installed. There seems to be some talk about the latest Xorg update changing something but I can't find any details.

byhisdeeds
Offline
Joined: 2006-01-06

I just tried the SwingSet2 demos under the smp version of the 2.6.26_2096 kernel and I don't such a large CPU usage, only some 40%. I don't know if that means anything but I just thought I'd let eveyone know.

trembovetski
Offline
Joined: 2003-12-31

Thanks for the info. Again, just to verify, are you running SwingSet with GTK Look and Feel?

Dmitri

byhisdeeds
Offline
Joined: 2006-01-06

Yes, with GTK Look and Feel. However running SwingSet with the default or Motif look and fell gives the same 100% CPU result.

mikael
Offline
Joined: 2004-03-04

Seems to work fine on my FC5 upgraded from FC4:

Tested with standard and opengl pipeline.

Using the NVidia 8178 driver

uname -a
Linux neoglyph 2.6.16-1.2064_FC5 #1 SMP Mon Mar 20 16:52:42 EST 2006 x86_64 x86_64 x86_64 GNU/Linux

keeskuip
Offline
Joined: 2003-06-17

I see very slow performance with the "nv" driver of xorg.

Kees.

keeskuip
Offline
Joined: 2003-06-17

It seems that the slowdown is due to jdk1.6 in combination with the gtk-look-and-feel.

I'm using the Clearlooks theme and my java version is:

# java -version
java version "1.6.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-beta2-b72)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b72, mixed mode, sharing)

trembovetski
Offline
Joined: 2003-12-31

Could you please try with the latest build? There was a number of performance-related fixes in GTK L&F area since b72.

And GTK L&F is continued to be worked on.

If the new build doesn't help, as a workaround try setting the following env. variable prior to starting the app: J2D_PIXMAPS=shared

Thanks,
Dmitri
Java2D Team

keeskuip
Offline
Joined: 2003-06-17

No, I tried both suggestions with the SwingSet2 application but the performance is still really slow.

I'm now using:
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b77, mixed mode, sharing)

I used the same application with the same jvm on fedora 4 en on fedora 5. The application flies on fedora 4 whereas it crawls on fedora 5.

Kees.

trembovetski
Offline
Joined: 2003-12-31

OK, looks like we'll need to do some testing on FC5, since the problem appears to be FC5-specific.

What video board do you have installed? Did you install the manifacturer's drivers, or whatever comes with FC5?

Alsom what's the CPU?

Dmitri
Java2D Team

keeskuip
Offline
Joined: 2003-06-17

> OK, looks like we'll need to do some testing on FC5,
> since the problem appears to be FC5-specific.
>
> What video board do you have installed? Did you
> install the manifacturer's drivers, or whatever comes
> with FC5?
>
Videoboard: nVidia Corporation NV18 [GeForce4 MX 440 AGP 8x] rev 162
Driver: 'nv' of xorg (this is whatever comes with FC5)

> Alsom what's the CPU?

# uname -a
Linux koffie 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 athlon i386 GNU/Linux

Kees