From 7ffd8310e645949c75489a8ea9bac73067f5c7a8 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 30 Jun 2025 01:46:45 +0200 Subject: [PATCH] Improve code tokenization estimation. --- profiler/src/profiler/TracyLlmTools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyLlmTools.cpp b/profiler/src/profiler/TracyLlmTools.cpp index 6d824fcc..ac786bb3 100644 --- a/profiler/src/profiler/TracyLlmTools.cpp +++ b/profiler/src/profiler/TracyLlmTools.cpp @@ -856,13 +856,13 @@ std::string TracyLlmTools::SourceFile( const std::string& file, uint32_t line ) { if( minLine > 0 ) { - size += lines[minLine].size() + 1; + size += lines[minLine].size() * 3 + 30; if( size >= maxSize ) break; minLine--; } if( maxLine < lines.size() ) { - size += lines[maxLine].size() + 1; + size += lines[maxLine].size() * 3 + 30; if( size >= maxSize ) break; maxLine++; }