diff --git a/src/ktrace.cpp b/src/ktrace.cpp index ac35e8f..8d63e78 100644 --- a/src/ktrace.cpp +++ b/src/ktrace.cpp @@ -665,8 +665,10 @@ KTrace::KTrace( const string& whichFile, ProgressController *progress, bool noLo unsigned long long count = 0; if( !( noLoad && !body->ordered() ) ) { + int insertCounter = 0; while ( !file->eof() ) { + ++insertCounter; body->read( *file, *blocks, traceProcessModel, traceResourceModel, hashstates, hashevents, myTraceInfo, traceEndTime ); if( blocks->getCountInserted() > 0 ) ++count; @@ -674,8 +676,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