Page 1 of 1

Slowdowns while playing DM Java (solved)

Posted: Sun Jun 06, 2010 12:49 pm
by farvardin
Hello,

I've installed the latest DM Java, and played the first level for about 30 minutes. The problem is I get randomly massive slowdowns (3-4 seconds when clicking a direction tile). Other times, it's working fine. I tried to disable the automap, but the slowdown is still there.

I'm running openJDK:

java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (ArchLinux-6.b18_1.8-1-i686)
OpenJDK Server VM (build 14.0-b16, mixed mode)

My computer is quite decent (AMD Athlon(tm) 64 X2 Dual Core Processor 3800+), with 2 Gb of memory. The CPU is not particulary occupied when I get those slowdowns.

Any ideas for improving the game experience?

Re: Slowdowns while playing DM Java

Posted: Sun Jun 06, 2010 2:52 pm
by Roquen
It's probably the garbage collector. Try increasing the allocated memory to Java when you launch.

Re: Slowdowns while playing DM Java

Posted: Sun Jun 06, 2010 3:39 pm
by Adamo
The CPU is not particulary occupied when I get those slowdowns.
Does your machine slows down in other cases too (when running other programs)? I`m note sure what causes them in your case, but I`ve got an Acer laptop and I had huge random lags from time to time on various programs (particularly those eating a lot of CPU resources, but not only). Didn`t know what was that - the CPU wasn`t occupied much. There were no viruses or spywares on the system. I was so confused that I reinstalled the whole system, but the case occured again. It was about 2 months before I figured out that it`s a simple problem with a CPU cooling; the whole CPU fan was so sticked with dirt it could barely move; so the CPU slowed down, wchich wasn`t even noticed by the CPU tracking program! When I cleaned it, everything worked well. I have to do this for about 1 time a year. My laptop is cooled from the bottom, so it`s often crammed with dust. With sticked fan it can be one of the reasons.

Re: Slowdowns while playing DM Java

Posted: Sun Jun 06, 2010 5:31 pm
by alandale
Definitely try increasing the allocated memory. If that doesn't help I'm not sure what to tell you. I haven't noticed any slowdowns on my laptop running Mac or Windows. I tested using Java version 1.6.0_20, though I don't think I played more than 10 minutes on Windows. I didn't try it with Linux or Open JDK I'm afraid, since I no longer have Linux installed on anything.

Re: Slowdowns while playing DM Java

Posted: Sun Jun 06, 2010 7:45 pm
by farvardin
Thank you all!

I didn't know it was possible to increase the available memory for java programs. I found out you can do this with this kind of command:
java -jar -Xmx400M Dungeon\ Master\ Java.app/Contents/Resources/Java/Dungeon\ Master\ Java.jar so now DMJ has 400 Mb (I don't know what is the default). With jconsole, I noticed the memory often reached 50 Mb, and then could difficultly decrease. With this new settings, it seems the memory used is going up and down more efficiently. There are still a few slowdowns, but much less than before.