Skip to content

Commit

Permalink
Add an update timer to the progress bar set to 500ms instead of
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jean-Marie Verdun committed Jan 31, 2017
1 parent e8c822c commit 7b5707b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Gui/ProgressBar.cpp
Expand Up @@ -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();
}
}
}
}
Expand Down

0 comments on commit 7b5707b

Please sign in to comment.