From 20ffb5cefbc8d3fff206b1c449f384d1dd33694c Mon Sep 17 00:00:00 2001 From: Ricard Date: Tue, 11 Jul 2023 14:41:31 +0200 Subject: [PATCH 1/2] Decreased progress bar status update frequency while loading trace --- src/ktrace.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ktrace.cpp b/src/ktrace.cpp index ac35e8f3..a1e28642 100644 --- a/src/ktrace.cpp +++ b/src/ktrace.cpp @@ -665,6 +665,7 @@ KTrace::KTrace( const string& whichFile, ProgressController *progress, bool noLo unsigned long long count = 0; if( !( noLoad && !body->ordered() ) ) { + int insertCounter = 0; while ( !file->eof() ) { body->read( *file, *blocks, traceProcessModel, traceResourceModel, hashstates, hashevents, myTraceInfo, traceEndTime ); @@ -674,8 +675,9 @@ KTrace::KTrace( const string& whichFile, ProgressController *progress, bool noLo if ( blocks->getCountInserted() >= 10000 ) { memTrace->insert( blocks ); - if ( progress != nullptr ) + if ( progress != nullptr && insertCounter == 100 ) { + insertCounter = 0; if ( file->canseekend() ) progress->setCurrentProgress( file->tellg() ); else From 7fe99649829e78e41018bf379c0b58dbb343d392 Mon Sep 17 00:00:00 2001 From: Ricard Date: Tue, 11 Jul 2023 15:06:49 +0200 Subject: [PATCH 2/2] Forgot to increment the variable. Ooops. --- src/ktrace.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ktrace.cpp b/src/ktrace.cpp index a1e28642..8d63e785 100644 --- a/src/ktrace.cpp +++ b/src/ktrace.cpp @@ -668,6 +668,7 @@ KTrace::KTrace( const string& whichFile, ProgressController *progress, bool noLo int insertCounter = 0; while ( !file->eof() ) { + ++insertCounter; body->read( *file, *blocks, traceProcessModel, traceResourceModel, hashstates, hashevents, myTraceInfo, traceEndTime ); if( blocks->getCountInserted() > 0 ) ++count;