Forum C# Debug messages hurt performance?

Debug messages hurt performance?

Postby azuanagames » October 4th, 2010, 2:31 am

Do the following messages somehow get stubbed out when the DLL goes live? I compile in Release mode and still see them:

Console.WriteLine
RefreshDebugView
GenerateDebugImage

Thanks
azuanagames
 
Posts: 157
Joined: April 29th, 2010, 10:59 pm

Re: Debug messages hurt performance?

Postby Oliver » October 4th, 2010, 10:14 am

They don't get removed from the dll, but they don't really do anything when running on the live game servers.

Console output gets piped into nowhere, and if you call RefreshDebugView, it will only call GenerateDebugImage when your code is running in the development server.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug messages hurt performance?

Postby azuanagames » October 4th, 2010, 11:22 am

Sounds good! I was mostly concerned with making sure GenerateDebugImage was not being called.

Thank you
azuanagames
 
Posts: 157
Joined: April 29th, 2010, 10:59 pm


Return to C#



cron