• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

CPU lag

Status
Not open for further replies.
Level 6
Joined
Dec 28, 2006
Messages
102
When I play my map, it doesn't leak memory. Latency is good, there are no lags, but sometimes in some moment game starts using 100% CPU :eek:, and FPS goes below 1. What can cause it? I use some spells which create a lot of units but they are leak-free and can lag just for a moment. PC on which I played is Duron 900, 512 RAM, GeForce MX 420. My main computer is much better, but I don't have internet connection yet on this PC.
 
Level 6
Joined
Dec 28, 2006
Messages
102
-if you kill units (even invisible dummies!), their corpses can build up and cause lag until they finish decaying

-If you have infinite loops, or really long loops, etc, (among other things), you can overload your processor.

Can it eventually lead to game crash? But I don't think there are infinite loops in map. What do you mean "really long loops"? Loops with lot of actions in them or with many cycles? Does orders or custom values of units leak processor after their death?


Creating mass effects can cause horrible leaks aswell. :hohum:
I don't use mass effects, rather mass of dummy units. But It doesn't leak after spell finishes. Creates some lag on PC I played, but not very much and only during spell effect.

Map really uses about 200MB RAM - it's normal in W3, after some time memory usage doesn't increase (much). As I said lags rather goes not from memory but CPU.
 
Can it eventually lead to game crash? But I don't think there are infinite loops in map. What do you mean "really long loops"? Loops with lot of actions in them or with many cycles?
Really infinite Loops cause the game to crash.
And loops with alot of actions which do not run that much can lag and extreme long loops can lag even they got just a few actions. (for example some huge searching loops)
 
Level 2
Joined
Sep 1, 2007
Messages
12
Check the temperature of your CPU. if its above 40° C, then you'll need to cooldown your computer. Although mine runs good at 42° C, it sometimes automatically shuts down when it gets too hot. I'm guessing the breaking point is 50°C? Generally you want your CPU to run at ~35°C.

Set your game resolution lower; my fps drop from 50 to 20 when i set the resolution from standard 1024 x 768 x 16 to 1280 x 1024 x 32 resolution.

Disk Defragmenter? Virus Scan? Spyware Scan? Disk Cleanup? Turn off other programs?
Is your operating system vista? Vista usually drain a significant part of the CPU.

Maybe you should post your codes; sometimes leaks caused by GUI's BJ functions are not detected and, therefore, have not been removed.

Most periodic timer timeout duration should not be below 0.005 seconds (might be higher).
Issuing an order to a lot of unit at once causes lag.
 
Last edited:
Status
Not open for further replies.
Top