***extremely*** slow with openjdk

Bug #499156 reported by Mark
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
freecol (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: freecol

I was having extremely slow performance from freecol, as somebody else described in this thread:
http://sourceforge.net/projects/freecol/forums/forum/141201/topic/3269853
"Sometimes when I click another part of the map it takes a really long time to move, like 10-30 minutes long. It's easily overwhelmed. I dare not click too quickly, because then I know it will slow down on me. This is especially cumbersome when I'm trying to give troops goto orders, or select troops from another part of the map. The whole game seems rather slow. I'm running .8.2 in ubuntu jj."

I tried uninstalling the openjdk -- namely, running "dpkg -r openjdk-6-jre" and "apt-get remove openjdk-6-jre-headless".
From the output of the second command:
(Reading database ... 313213 files and directories currently installed.)
Removing icedtea-6-jre-cacao ...
Removing libaccess-bridge-java-jni ...
Removing libaccess-bridge-java ...
Removing openjdk-6-jre-headless ...
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode.
Removing openjdk-6-jre-lib ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

After this, I ran update-alternatives to make sure I was running Sun's Java 6. Now when I run the game (freecol), it is very responsive and playable. Yay!

I'm not sure what the problem was, nor do I think I have the technical skills to figure it out. I can offer one hint, however: running 'top' during playing the game, with OpenJDK, showed that 73% of CPU time was consumed by Xorg, and 20% from Java, so it is certainly some kind of graphical inefficiency.

details:
Distro: Karmic, freecol 0.8.3+dfsg-1, xorg 1:7.4+3ubuntu7, openjdk-6-jre 6b16-1.6.1-1ubuntu3 (slow!), sun-java6-jre 6-15-1 (works!)

Revision history for this message
Jochen Kemnade (jochenkemnade) wrote :

same for me on karmic 64 bit with freecol 0.9.0

Changed in freecol (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Jochen Kemnade (jochenkemnade) wrote :

same problems with lucid's current openjdk on a 64 bit system.
the proposed solution in comment 5 in http://sourceforge.net/projects/freecol/forums/forum/141201/topic/3269853 works for me.

Revision history for this message
Michael Alexander (ftmichael) wrote :

Same issue with Maverick (i386 system), except that removing OpenJDK did not help, even after a system restart. I'm running Sun Java 6 and it's still painfully slow. I can't find the Freecol startup script to edit it as per comment 8 in http://sourceforge.net/projects/freecol/forums/forum/141201/topic/3269853 . Help?

Revision history for this message
Michael Alexander (ftmichael) wrote :

Found the Freecol startup script in /usr/games/ , not /usr/bin/ as indicated at http://sourceforge.net/projects/freecol/forums/forum/141201/topic/3269853 . Added the bit indicated and the problem is now fixed.

Recap:
cd /usr/games/
sudo gedit freecol

Added -Dsun.java2d.pmoffscreen=false to the last line

Revision history for this message
nloewen (nloewen) wrote :

Also present in Natty

Revision history for this message
Danny Staple (danny-orionrobots) wrote :

Have you tried increasing the amount of stack available? The default in Ubuntu is 190M. I've upped that to 512Mb.
It can be very slow during AI turns.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.