From 2442c8fe583fd45e3f2b86d42042b3c47896d2b3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 14 Sep 2017 19:09:14 +0200 Subject: [PATCH] Use one flag to control whether LZ4 is enabled. --- client/TracyProfiler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 39d37cc6..9ddde8d2 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -7,6 +7,10 @@ #include "../common/TracySystem.hpp" #include "TracyProfiler.hpp" +#ifdef _DEBUG +# define DISABLE_LZ4 +#endif + namespace tracy { @@ -88,7 +92,7 @@ void Profiler::Worker() } m_sock->Send( &m_timeBegin, sizeof( m_timeBegin ) ); -#ifdef _DEBUG +#ifdef DISABLE_LZ4 // notify client that lz4 compression is disabled (too slow in debug builds) char val = 0; m_sock->Send( &val, 1 ); @@ -125,7 +129,7 @@ void Profiler::Worker() bool Profiler::SendData( const char* data, size_t len ) { -#ifdef _DEBUG +#ifdef DISABLE_LZ4 if( m_sock->Send( data, len ) == -1 ) return false; #else char lz4[LZ4Size + sizeof( lz4sz_t )];