Improve code tokenization estimation.

This commit is contained in:
Bartosz Taudul
2025-06-30 01:46:45 +02:00
parent 6c05079e7b
commit 7ffd8310e6

View File

@@ -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++;
}