Archived

This topic is now archived and is closed to further replies.

[java] java being chippy

This topic is 5131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well I developed the majority of my game at my school, on my school''s computers, and it ran completely fine(they got 800Mhz Pentium Celerons), but for some very odd reason it''s running slowly on my computer(AMD XP 1600+).. Anyone have any idea of why it''s going so slow(it''s pretty much any java application and I just reformated my computer, wasn''t like that before I formatted).

Share this post


Link to post
Share on other sites
quote:
Original post by ManiacMac
In many of the cases where Java applications and applets run slow on my computer, is when I have something like Winamp open at the same time.


Winamp doesn''t take up that much processor power. Unless the apple you''re running is really processor intensive, Winamp shouldn''t make any noticable difference.

Share this post


Link to post
Share on other sites
quote:
Original post by NuffSaid
What type of Java program is it? Is it an Applet or an Application? Which Java Runtime are you using (at school, and at home)?

Every single one I tried, both, and Sun''s 1.4.2 on both at home and at school

Share this post


Link to post
Share on other sites
Well it goes normal, then slows to a stall for a second, then goes normal for like another 2 seconds then slows to a stall again.. Really how do you get more specific?

Share this post


Link to post
Share on other sites
One possible suspect could be the garbage collection by that description.

How much memory are you giving the game at startup, and more importantly, how many objects are you creating during the game''s main loop that get dereferenced?

Share this post


Link to post
Share on other sites
quote:
Original post by eedok
Well it goes normal, then slows to a stall for a second, then goes normal for like another 2 seconds then slows to a stall again.. Really how do you get more specific?


Well, you still haven''t said whether it is an applet or an application (i.e. do you run it in a browser, or not). The reason this is important is that one of your browsers might be IE, and it might be using MS''s version of the JVM. But if it is an application, just disregard this.

Also, like has already mentioned, it sounds like the GC kicking in every few seconds or so. You might want try passing the -server flag as this increases the heap size, and it tells the VM to do loads more optimizations as well.


java -server youApplication

Share this post


Link to post
Share on other sites
The reason Winamp slows things down is because it''s rendered with DirectX exclusive access I think - and so is Java. DirectX drivers are probably the issue here.

Cas

Share this post


Link to post
Share on other sites
quote:
Original post by NuffSaid
quote:
Original post by eedok
Well it goes normal, then slows to a stall for a second, then goes normal for like another 2 seconds then slows to a stall again.. Really how do you get more specific?


Well, you still haven''t said whether it is an applet or an application (i.e. do you run it in a browser, or not). The reason this is important is that one of your browsers might be IE, and it might be using MS''s version of the JVM. But if it is an application, just disregard this.

Also, like has already mentioned, it sounds like the GC kicking in every few seconds or so. You might want try passing the -server flag as this increases the heap size, and it tells the VM to do loads more optimizations as well.


java -server youApplication


You''re just trying to annoy me now with that first thing you said, and now I shall quote myself answering you.
quote:
Original post by eedok
quote:
Original post by NuffSaid
What type of Java program is it? Is it an Applet or an Application? Which Java Runtime are you using (at school, and at home)?

Every single one I tried, both, and Sun''s 1.4.2 on both at home and at school


But I''ll try the direct X thing cause I just realized I only got DX 6.0 on the system at home, so maybe that''s the problem I''ll try a newer DX and see how it goes..

Share this post


Link to post
Share on other sites
I would also examine object use in you game. You should attempt to allocate as few objects as possible during your game. Every object will have an effect on how the GC operates.

Share this post


Link to post
Share on other sites
My bad about hte app/applet thing. If it is jerky with every applet/application that you''re running, you might want to try running the Java2D demo. See if that stutters on your home machine.

Share this post


Link to post
Share on other sites