Skip to content

Commit e8453eb

Browse files
committed
perf: disable COM_TimestampedLog
within threaded particles, there was a lot of traffic on a log mutex, and that was slowing things down significantly I'm not exactly sure why this was triggering, as the code seems to prevent this from going off unless there is a -profile or -etwprofile argument, will investigate later. another option is also removing the COM_TimestampedLog from just the particles function, but who knows what else this could be slowing down
1 parent d2a9c8c commit e8453eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tier0/dbg.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ void ValidateSpew( CValidator &validator )
870870
//-----------------------------------------------------------------------------
871871
void COM_TimestampedLog( char const *fmt, ... )
872872
{
873+
#ifdef _DEBUG
873874
static float s_LastStamp = 0.0;
874875
static bool s_bShouldLog = false;
875876
static bool s_bShouldLogToETW = false;
@@ -925,6 +926,7 @@ void COM_TimestampedLog( char const *fmt, ... )
925926
}
926927

927928
s_LastStamp = curStamp;
929+
#endif
928930
}
929931

930932
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)