Page 1 of 1

Fixed cpu hog issue

Posted: Sat Oct 13, 2007 3:00 pm
by Red Squirrel
I just restarted the server to do a core edit to runuo. The cpu hog issue is now gone. There should no longer be lag spikes when lot of activity is going on.

This is bad:

Code: Select all

while(1) 
{
//do stuff here
}
And that this is good:

Code: Select all

while(1) 
{
Thread.Sleep(1);
//do stuff here
}
There was actually a check against single or duel cpu, if it was duel then it did not have sleep, causing runuo to basically choke itself in a cpu hogging loop.

Archived topic from AOV, old topic ID:1435, old post ID:8985