From 50cd9dae6f0f2cd15f1862052d64eba622b9718e Mon Sep 17 00:00:00 2001 From: xavier Date: Fri, 21 May 2021 20:57:15 +0200 Subject: [PATCH] periodically flush processed queries results. --- client/TracyProfiler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 9024c2d7..9194b170 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -1688,9 +1688,12 @@ void Profiler::Worker() } bool connActive = true; - while( m_sock->HasData() && connActive ) + int queryCounter = 0; + constexpr int flushPeriod = 500; + while ( m_sock->HasData() && connActive && queryCounter < flushPeriod ) { connActive = HandleServerQuery(); + queryCounter++; } if( !connActive ) break; }