On Fri, Oct 27, 2017 at 03:48:32PM +0000, Richard Heck wrote: > On 10/27/2017 03:24 AM, Jürgen Spitzmüller wrote: > > Am Freitag, den 27.10.2017, 02:35 -0400 schrieb Scott Kostyshak: > >> On Fri, Oct 14, 2016 at 06:10:22PM +0000, Juergen Spitzmueller wrote: > >>> commit 0eb651a2cf6c8c4d39e461748292ffe4e69f2386 > >>> Author: Juergen Spitzmueller <sp...@lyx.org> > >>> Date: Fri Oct 14 20:08:12 2016 +0200 > >>> > >>> New layout tags for better counter handling > >>> > >>> * ResumeCounter: allow to resume an (enumerate) counter > >>> * StepMasterCounter: allow to increase a master counter > >> LyX 2.3.x is opening some files slower than older LyX versions for > >> me. > >> After this commit, the Embedded Objects manual opens about 2 or 3 > >> seconds slower for me than before this commit, on average. > > I fail to see how this is caused by this patch, though. Do these files > > have resuming counters? > > I looked over the commit and also find it hard to see how it could be at > fault. Since the changes to the modules themselves were only committed > in the next two commits, the code committed here should have had > essentially no effect. The only new code that actually gets used is: > > --- a/src/Buffer.cpp > +++ b/src/Buffer.cpp > @@ -4673,7 +4673,7 @@ static bool needEnumCounterReset(ParIterator const > & it) > --prev_it.top().pit(); > Paragraph const & prev_par = *prev_it; > if (prev_par.getDepth() <= cur_depth) > - return prev_par.layout().labeltype != > LABEL_ENUMERATE; > + return prev_par.layout().name() != > par.layout().name(); > } > // start of nested inset: reset > return true; > > But par.layout().name() is not expensive. So I think something else must > be happening.
OK, thanks for taking a look Jürgen and Richard. > Note that this commit would cause a lot of runs of layout2layout, since > the formats of the layout files themselves had not yet been updated. Perhaps this is what made it slow for me. So a 2 to 3 second delay compared to the previous commit is not surprising? Scott
signature.asc
Description: PGP signature