Opening Document > Settings feels a bit laggy to me

Richard Kimberly Heck rikiheck at gmail.com
Sun Mar 9 16:09:19 UTC 2025


On 3/9/25 12:02 PM, Paul Rubin wrote:
>
>
> On 3/8/25 12:49, Scott Kostyshak wrote:
>> On Sat, Mar 08, 2025 at 11:31:47AM -0500, Paul Rubin wrote:
>>>
>>> On 3/8/25 07:39, Scott Kostyshak wrote:
>>>> To reproduce:
>>>>
>>>> 1. Start a new document.
>>>> 2. Document > Settings.
>>>>
>>>> To me, it feels like it takes a bit longer for the dialog to show 
>>>> than I remember.
>>>>
>>>> I did a quick check and indeed 2.3.0 and 2.3.x are faster. However,
>>>> often when I debug these issues it turns out I have different compiler
>>>> settings (e.g., optimization level or debug flags), or actually
>>>> layout2layout is running in the background of master and that won't be
>>>> the case on release. i.e., I have no idea if this difference is due 
>>>> to a
>>>> code change, so I thought I would ask here before I attempt a git
>>>> bisect.
>>>>
>>>> Does the above recipe feel slower to anyone else (especially those on
>>>> older machines)?
>>>>
>>>> Scott
>>>>
>>> I have an HP 570 Pavilion (probably about seven years old) running 
>>> Linux
>>> Mint, and I can confirm that there is a mildly disconcerting lag the 
>>> first
>>> time I go to document settings. After the first time, there's no 
>>> perceptible
>>> lag. I thought maybe some sort of caching was occurring, but that 
>>> does not
>>> explain the following. If I start LyX, create a document, go to 
>>> settings
>>> (lag), create a second document and go to settings in that document, 
>>> there
>>> is no lag in the second document, even though it is my first time 
>>> looking at
>>> settings for that document.
>> Thanks for checking, Paul. Which LyX version did you check on?
>>
>> Scott
>>
> Sorry, meant to include that and forgot. It was 2.4.3.

I think this is simply because there is a whole lot of stuff that 
happens the first time the dialog is opened, and there is a fair bit 
more now than in 2.3.x. The GuiDocument constructor is nearly 1000 lines 
of code. That only runs the first time. After that, the dialog is only 
'hidden', not destroyed. Parameter initialization is done every time, 
but is comparatively fast.

Riki




More information about the lyx-devel mailing list