From 8acf39365c14abe7730ca1d57d46f0aae38233d8 Mon Sep 17 00:00:00 2001 From: Jean-Marie Verdun Date: Tue, 31 Jan 2017 23:02:40 +0100 Subject: [PATCH] Add an update timer to the progress bar set to 500ms instead of nothing. STEP Reader is updating the progress bar every time a new Shape is decoded/transferred and loaded, which is a huge amount of "interrupt" and slow down drastically the global performance --- src/Gui/ProgressBar.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Gui/ProgressBar.cpp b/src/Gui/ProgressBar.cpp index 67f1df74e1..ba5f2e83bd 100644 --- a/src/Gui/ProgressBar.cpp +++ b/src/Gui/ProgressBar.cpp @@ -215,11 +215,14 @@ void Sequencer::setValue(int step) showRemainingTime(); } else { - d->bar->setValue(step); - if (d->bar->isVisible()) - showRemainingTime(); - d->bar->resetObserveEventFilter(); - qApp->processEvents(); + int elapsed = d->progressTime.restart(); + if (elapsed > 500) { + d->bar->setValue(step); + if (d->bar->isVisible()) + showRemainingTime(); + d->bar->resetObserveEventFilter(); + qApp->processEvents(); + } } } }