Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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

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.


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?

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

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

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?

Pages: [1]
DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (748 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (555 views)
2018-03-24 14:43:53

Solater (94 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (338 views)
2018-03-02 22:15:33

buddyBro (998 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!