Skip to content

Commit 48cb63e

Browse files
committed
Tweak performance warning to give some more context
Maybe people will stop blaming my code for being slow, when actually it's just that I am the only one dumb enough to spew, "Hey stuff seems to be slow in general and it's causing my stuff to be slow". Oh, who am I kidding this will have no effect. P4:6571362
1 parent c048e5f commit 48cb63e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,11 @@ void LockDebugInfo::AboutToUnlock()
325325
// Yelp if we held the lock for longer than the threshold.
326326
if ( usecElapsedTooLong != 0 )
327327
{
328-
SpewWarning( "SteamNetworkingSockets lock held for %.1fms. (Performance warning). %s", usecElapsedTooLong*1e-3, tags );
328+
SpewWarning(
329+
"SteamNetworkingSockets lock held for %.1fms. (Performance warning.) %s\n"
330+
"This is usually a symptom of a general performance problem such as thread starvation.",
331+
usecElapsedTooLong*1e-3, tags
332+
);
329333
ETW_LongOp( "lock held", usecElapsedTooLong, tags );
330334
}
331335

0 commit comments

Comments
 (0)