Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Performance Tuning / Re: Random graphics slowdowns on: 2007-11-26 08:41:44
I'm running on a dual-core Pentium D 930, 2Gb RAM and a either a Matrox Parhelia or a Matrox QID quad-head card. The Matrox cards are a bit hopeless really!! I'd suspect that the problem is somehow related to the Matrox carrds as the problem does not seem to be as common on less powerful machines with better graphics cards.
2  Game Development / Performance Tuning / Re: Random graphics slowdowns on: 2007-11-16 14:53:56
Hmm,

We are using Java 5 so it's not a bug introduce in Java 6.

I can't reproduce the problem reliably when running normally, let alone in the profiler. I think it must be some sort of threading issue, but I've no idea what it might be.

Sometimes the drawing may slow right down even though there are very few windows open, and then at other times there may be many more windows open and everything runs fine.

 Huh

Alex
3  Game Development / Performance Tuning / Re: Random graphics slowdowns on: 2007-11-14 08:29:28
The problem is not due to the video memory being filled because I tried finding out how many windows my application needs to open before images stop being created in video memory. I run out of stack space before I run out of video memory, and I have to have an insane number of windows open to do it.

I tried getAvailableAcceleratedMemory()  but it returns the sum of the available video memory, plus the amount of system memory that can be used for textures. So I get 600Mb free on a 128Mb video card!!!

In the end I used the Caps Viewer utility from the DirectX SDK to find the actual amount of memory free on the video card, and as I said I don't think that running out of video memory is causing this random slowdown

PS fletchergames what do you mean by "I'd try not calling repaint from a timer task like they suggested.". I'm using a timer task to make sure that the performance is deterministic (this was a change made in trying to solve this slowdown problem), it's not calling repaint from the Swing thread
4  Game Development / Performance Tuning / Re: Random graphics slowdowns on: 2007-11-07 08:58:16
Thanks for the replies,

The repaint() is being called from a timer task and so is not being called from the event thread, but surely that might cause problems with when painting happens rather than suddenly slowing down.

I've used both OptimizeIt and the Netbeans profiler in trying to track down this problem, the trouble is I've never managed to replicate the problem when running in the profiler.

When everything is painting correctly and performance is good, there is no excessive garbage collection going on (the time spent in GC barely registers in the netbeans profiler), but I haven't been able to tell what changes when everything slows down. Also there is no memory leak, even after running for an entire weekend the memory usage had barely changed.

I have made a change to make sure that a large image that is loaded into memory that doesn't require high performance is not being loaded into video memory by using setAccelerationPriority(0), does this actually do anything!? I'm wondering if I'm running out or video memory and some images that has been accelerated are suddenly not anymore. Does this sound likely?

Alex
5  Game Development / Performance Tuning / Re: Random graphics slowdowns on: 2007-11-03 12:32:57
One of the possibilities that I had though of was that the images that had been hardware accelerated suddenly were not because the video memory was full, but surely that would be reproducible by opening lots of windows, and this doesn't seem to be that case. I'll try it again though just to see.

I'm not sure that a BufferStrategy makes any difference, I'm pretty sure that we tried it before, and if anything it was slower. I'll try again to be sure.

The images need to be hardware accelerated to get the required performance. The trouble is the Matrox Parhelia and QID cards we're using are a bit pathetic! The point about unnecessarily accelerating images that don't need to be is an interesting one as I do have a large static off screen BufferedImage that could be using a lot of video memory when it shouldn't, I'll check whether it is or not.

Thanks for the suggestions


Alex
6  Game Development / Performance Tuning / Re: Random graphics slowdowns on: 2007-11-02 08:32:32
The trouble is the paintComponent() method usually executes very quickly, but then suddenly, for no reason I can find, it starts to take very much longer. Also, I'm pretty sure that only one thread will be calling the repaints on the component that seems to be causing the problem. Other components will be being updated by other threads, but that shouldn't be causing this.
7  Game Development / Performance Tuning / Random graphics slowdowns on: 2007-11-01 23:15:44
Hi,

I'm not sure if this is the right place to post a message like this, but I'm out of ideas.

I have a problem with an application I am developing, it's fairly complex with the possibility of having many windows open at once. Some may be drawing vector graphics some may be using raster graphics some may just be displaying ordinary swing components, all updating at the same time.

The problem seems to be that very occasionally when one of the raster windows is open, the time taken for it's paintComponent() method goes through the roof. It suddenly jumps from taken a few tens, maybe 100 milliseconds to taking three seconds to draw a few updates. The trouble is it's very intermittent and I've never managed to get it to happen when running in a profiler, so I can't tell exactly what line is the problem (or even if it is as simple as that). The result of this is that the whole GUI becomes very unresponsive until the offending window is closed, opening it up again (which recreates it from scratch) after a couple of minutes seems to solve the problem.

The window is using MemoryImageSources and VolatileImages to draw. I think what is happening is that either there is some excessive object creation and so there is a lot of garbage collection going on, or the event queue is becoming flooded with pending events and not keeping up. The thing is, surely both of these possibilities should be reasonably reproducable.

I know it's a long shot, but has anyone here seen anything like this before? What could cause the same code to suddenly take so much longer to execute?


Alex
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (50 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (57 views)
2014-11-29 21:32:03

toopeicgaming1999 (123 views)
2014-11-26 15:22:04

toopeicgaming1999 (113 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!