High CPU, high GDI stalling

Started by bigben, December 08, 2008, 03:21:03 PM

Previous topic - Next topic

bigben

TGD: http://forums.planetside.co.uk/index.php?topic=5260.msg55171#msg55171
Terrains: http://www.bigben.id.au/terragen/files/terrains/nz/

While preparing this file I had some unexpected behaviour that I hadn't seen before.  Added all of the terrains, and a masking clip for each. While connecting the masks, each connection took longer and longer to complete.  Dragging an output connection to an input until it turned green, then releasing the connection.... the line would stay green for a long time (minute or more) before allowing anything else to be done. 

Restarting TG would load the TGD OK but after a few edits things slowed right down again. Possibly related to "undo" ?  Checked the task manager and CPU usage was maxed out and GDI objects were relatively high (2600+) and slowly climbing.  CPU usage and GDI objects would drop occasionally before going back up again. After several cycles of this the line connection would be completed.

Originally had two keyframes with different views (one in orbit, one close to the terrain). Switching between frames would simply stall completely.  I was going to run some more tests on this before reporting until others were also experiencing the same problems.  My current system has only 1Gb of RAM, and RAM usage of TG was at around the maximum available, although VM was not too high.

Opening the file takes a while with CPU usage maxing out and GDI objects climbing from 250 to 2500, RAM usage aftre preview render completes is only 275Mb.

Tested with my Grand Canyon terrain set and it exhibits similar behaviour.  Also has two keyframes, and switching between frames results in the same CPU/GDI objects behaviour.

Tangled-Universe

#1
I can confirm these problems.

Loading the .tgd only took already a couple of minutes, during loading RAM usage was about 60MB, after loading it spikes up to 610MB at once, staying there even after finishing the preview. GDI objects is 2553, VM size is 850MB.
Whenever I try to connect shaders the GDI objects drop to about 1000 and rises back to ~2500 in a couple of minutes, rendering the entire program frozen for the time being.

My setup is a Q6600 with 8GB RAM, XP Pro 64-bit.

Martin

Tangled-Universe


bigben

At least I know it's not my piddling amount of RAM  ;)  I had previously had no problems with my Grand Canyon set which has the same number of TER files in a similar configuration.

jo

Hi Ben,

I'll check this out tomorrow, sounds like an intriguing problem!

Regards,

Jo

jo

Hi Ben,

I've been looking into this and have made some good progress. It's actually a very complex file! Basically I've done some work optimising the lists and made them a lot faster, which is where a lot of the time was being spent. It cuts the setup time from about 11 seconds to 2.5 seconds. I had tested the list code with a lot of items, but not so many as that.

This also effected making node connections, and that's a lot quicker but still a touch laggy. It'll need more work to improve that further.

The high GDI usage is because the file causes 2500 list items ( with icons ) to be created in the terrain list! I thought it must have been a leak, but happily it isn't. I'll have to see if I can change the way GDI objects are used to reduce the number created. In the future even more complex files may be created and it's getting a bit into the red zone already.

Regards,

Jo