HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ubertehliscuos End-Game Lag!

09-23-2007, 02:19 AM#1
Hydrolisk
Sometimes, when I play WC3 Ladder, I like to just screw around.
But today, I was using a custom race.
I decided to tower my one opponent to death.
I created a whole team of workers to keep attacking, while I have one spamming towers (while I have the cheat "warpten" on).
Eventually, there is a HUGE amount of towers.
When I won and ALT+F4'd ad hotkeyed X though, a HUGE amount of lag occurred. After about 5 minutes, it was still trying to exit the game! (It was direct Exit Game.)

Could I have some explanations? I personally think it's just the amount of units but just in case there's other reasons...
09-23-2007, 06:38 AM#2
Pyrogasm
It has to do with custom models, I believe. If there have been many units with custom models throughout the course of the game, the game will take a long time to exit.


But then again... maybe that's some myth that I picked up along the way.
09-23-2007, 08:49 AM#3
Captain Griffen
Massive memory stuff to clean up, including:

- Memory leaks.
- Memory used by objects (units, groups, etc.).
- Memory caching data (unit data, ability data, model data, etc.).
- And anything else that uses memory must be released.

The bigger this is, the longer it takes to clean up and quit.
09-24-2007, 10:21 PM#4
Strilanc
Warcraft 3 cleans up after a game, removing all custom modes, locations, etc from memory. It shouldn't do this when you tell the game to exit, as it isn't necessary, but it does. I imagine that means it goes through every remaining pointer and frees it, which is horribly slow when there are significant memory leaks (unused things get cached to disk, and disk is SLOW).

If you want it to go faster, kill war3.exe from the processes list in the task manager. The operating system will deallocate all the memory assigned to warcraft 3 at once, since it knows none of it is needed anymore.
09-24-2007, 10:23 PM#5
Captain Griffen
Quote:
Originally Posted by Strilanc
Warcraft 3 cleans up after a game, removing all custom modes, locations, etc from memory. It shouldn't do this when you tell the game to exit, as it isn't necessary, but it does. I imagine that means it goes through every remaining pointer and frees it, which is horribly slow when there are significant memory leaks (unused things get cached to disk, and disk is SLOW).

If you want it to go faster, kill war3.exe from the processes list in the task manager. The operating system will deallocate all the memory assigned to warcraft 3 at once, since it knows none of it is needed anymore.

You know I really hate restarting because memory gets lost by doing stuff like that...?
09-24-2007, 10:37 PM#6
Hydrolisk
I wasn't using anything imported! The only thing that I can think of is the trigger: Every 5 seconds, group all living buildings for each player, check if the amount is 0 (to simulate Defeat/Victory), defeat the player if it is 0, and then it SHOULD clean the group.

I'll put the trigger in here later so you can help kill the leaks...
09-25-2007, 01:34 AM#7
Strilanc
Quote:
Originally Posted by Captain Griffen
You know I really hate restarting because memory gets lost by doing stuff like that...?

No, modern operating systems keep track of the memory allocated to processes and clean up when killing processes.

If they didn't, any program with a memory leak would waste a little bit of your available memory. You wouldn't be able to keep your computer running for more than a few weeks, tops.

Read the consequences section: http://en.wikipedia.org/wiki/Memory_leak