On Sun, May 01, 2016 at 03:17:31PM +0100, Guillaume Munch wrote: > Le 01/05/2016 00:26, Scott Kostyshak a écrit : > > On Sat, Apr 30, 2016 at 03:44:48PM +0100, Guillaume Munch wrote: > > > This is candidate for 2.2.0 and 2.1.5. > > > > How noticeable and bad is the regression? > > On the one hand I did not notice any particular slowness, on the other > hand it nullified the fix to #7138 which was a performance complaint.
OK, I suggest not for 2.2.0 then at this point. No one has noticed the regression for 8 months. Scott > > > > > Scott > > > > > > Le 30/04/2016 15:42, Guillaume Munch a écrit : > > > > commit af89840334486e310d7951b2e84363f1caee0dfa > > > > Author: Guillaume Munch <g...@lyx.org> > > > > Date: Sat Apr 30 00:25:46 2016 +0100 > > > > > > > > TocWidget: Fix perf regression > > > > > > > > 4d1ad336 fixed #9754 but caused perf issues by cancelling the > > > > gains of having a > > > > timer (introduced after #7138). This introduces in > > > > GuiToc::enableView() a > > > > lightweight check of whether the widget should be updated. The > > > > logic is inspired > > > > from GuiViewSource::enableView(). > > > > > > > > diff --git a/src/frontends/qt4/GuiToc.cpp b/src/frontends/qt4/GuiToc.cpp > > > > index 7a64ba4..4404222 100644 > > > > --- a/src/frontends/qt4/GuiToc.cpp > > > > +++ b/src/frontends/qt4/GuiToc.cpp > > > > @@ -66,9 +66,12 @@ void GuiToc::dispatchParams() > > > > } > > > > > > > > > > > > -void GuiToc::enableView(bool /*enable*/) > > > > +void GuiToc::enableView(bool enable) > > > > { > > > > - widget_->updateViewForce(); > > > > + widget_->checkModelChanged(); > > > > + if (!enable) > > > > + // In the opposite case, updateView() will be called > > > > anyway. > > > > + widget_->updateViewForce(); > > > > } > > > > > > > > > > > > diff --git a/src/frontends/qt4/TocWidget.cpp > > > > b/src/frontends/qt4/TocWidget.cpp > > > > index 24bc433..e3693b7 100644 > > > > --- a/src/frontends/qt4/TocWidget.cpp > > > > +++ b/src/frontends/qt4/TocWidget.cpp > > > > @@ -452,6 +452,14 @@ void TocWidget::updateViewForce() > > > > } > > > > > > > > > > > > +void TocWidget::checkModelChanged() > > > > +{ > > > > + if (!gui_view_.documentBufferView() || > > > > + gui_view_.tocModels().model(current_type_) != > > > > tocTV->model()) > > > > + updateViewForce(); > > > > +} > > > > + > > > > + > > > > void TocWidget::filterContents() > > > > { > > > > if (!tocTV->model()) > > > > diff --git a/src/frontends/qt4/TocWidget.h > > > > b/src/frontends/qt4/TocWidget.h > > > > index 962c21a..39a6c29 100644 > > > > --- a/src/frontends/qt4/TocWidget.h > > > > +++ b/src/frontends/qt4/TocWidget.h > > > > @@ -42,6 +42,8 @@ public: > > > > /// > > > > bool getStatus(Cursor & cur, FuncRequest const & fr, FuncStatus > > > > & status) > > > > const; > > > > + // update the view when the model has changed > > > > + void checkModelChanged(); > > > > > > > > public Q_SLOTS: > > > > /// Schedule new update of the display unless already scheduled. > > > > > > > > > > > >
signature.asc
Description: PGP signature