[LyX features/cleanup/updateMacros] Some comments and some minor re-organization

Richard Kimberly Heck rikiheck at lyx.org
Mon Nov 9 23:45:04 UTC 2020


On 11/9/20 4:22 PM, Jean-Marc Lasgouttes wrote:
> 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

Thanks for the reminder. At the moment, I'm just trying to understand 
how this thing works and cleaning up some stuff that seems...hard to 
understand.

Riki




More information about the lyx-devel mailing list