[LyX features/cleanup/updateMacros] Some comments and some minor re-organization
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Mon Nov 9 21:22:29 UTC 2020
Le 09/11/2020 à 21:26, Richard Kimberly Heck a écrit :
> commit 4a6d50251a59f6f817ecbbbdb0d3295ee6a3bf5b
> Author: Richard Kimberly Heck <rikiheck at lyx.org>
> Date: Mon Nov 9 15:56:01 2020 -0500
>
> Some comments and some minor re-organization
> + // FIXME This is probably a large part of why updateMacros is
> + // so expensive. We are, it would seem, recreating these objects
> + // from scratch each time through. That seems unnecessary, if what
> + // usually needs updating is just the pos_ member.
> /// The position of the definition in the buffer.
> /// There is no guarantee it stays valid if the buffer
> /// changes. But it (normally) exists only until the
From what I remember, the main reason for slowness is that the
algorithm is quadratic: there are two nested loops over the document
somewhere. I do not remember the specifics though.
There may be useful information here (not sure though):
https://www.lyx.org/trac/ticket/5973
JMarc
More information about the lyx-devel
mailing list