Slowdowns while playing DM Java (solved)

This is a forum for the DM clone DM Java created by Alandale. Note it also has it's own set of forums at ezboard (link stickied)

Moderator: alandale

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
farvardin
Novice
Posts: 10
Joined: Mon Jun 04, 2007 12:20 am

Slowdowns while playing DM Java (solved)

Post 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?
Last edited by farvardin on Sun Jun 06, 2010 7:45 pm, edited 1 time in total.
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Re: Slowdowns while playing DM Java

Post by Roquen »

It's probably the garbage collector. Try increasing the allocated memory to Java when you launch.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Re: Slowdowns while playing DM Java

Post 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.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
alandale
Apprentice
Posts: 46
Joined: Wed Oct 13, 1999 2:43 pm
Location: Kirkland, WA

Re: Slowdowns while playing DM Java

Post 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.
farvardin
Novice
Posts: 10
Joined: Mon Jun 04, 2007 12:20 am

Re: Slowdowns while playing DM Java

Post 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.
Post Reply