Faster loading times... :)
by Ricky Taylor · in Torque Game Builder · 09/01/2007 (5:01 pm) · 3 replies
I noticed why TGB takes > 1 second to display a window.
In order to display the processor information line, it runs about 1 second's worth of code and works out the clock rate. This is completely unnecessary in TGB, and most TGE games. (It was originally sent as one of the server information tags.)
I've added in a full-text processor identifier for AMD, and re-done the processor detection a little. (I've removed the clock speed indicator.)
To remove the clock-speed checker yourself open "platformWin32/winCPUInfo.cc", or equivalent and remove from line 109:
If people think this is useful, shout and I'll package up meh new processor identifier for tha web.
-- Ricky26
In order to display the processor information line, it runs about 1 second's worth of code and works out the clock rate. This is completely unnecessary in TGB, and most TGE games. (It was originally sent as one of the server information tags.)
I've added in a full-text processor identifier for AMD, and re-done the processor detection a little. (I've removed the clock speed indicator.)
To remove the clock-speed checker yourself open "platformWin32/winCPUInfo.cc", or equivalent and remove from line 109:
// now calculate speed of processor... U16 nearmhz = 0; // nearest rounded mhz U16 mhz = 0; // calculated value.To line 228:
Con::printf(" (timed at roughly %.2f Ghz)", ((float)mhz)/1000.0f);
else
Con::printf(" (timed at roughly %d Mhz)", mhz);
}
}If people think this is useful, shout and I'll package up meh new processor identifier for tha web.
-- Ricky26
#2
09/05/2007 (11:45 am)
Interesting. TGB does take a while to start up..I always figured it was all the art assets and so forth. I tried this out and it does seem to start a bit faster. The only thing is..this code might be there for a good reason. However removing it doesn't seem to break anything, and it does compile without any extra warnings.
#3
I shall go about tidying my code then, and will submit it as a resource.
-- Ricky
09/06/2007 (1:58 pm)
The code was there because in TGE its listed in server-view. So you can make sure you don't get on a laggy server. I have checked through the code, and nothing seems to be addling itself. :)I shall go about tidying my code then, and will submit it as a resource.
-- Ricky
Torque 3D Owner Yiting -DeepSea- Chen
i m looking forward to see your new processor identifier
i wil give it a try lol
--Yiting