When clicking on the area of a header or footer in a long (my sample: 500 pages) writer document, it takes a long time (several seconds on my machine) until the divider line and the button to create a header or footer appears.
Anytime after having clicked on the header or footer area (regardless whether an actual header or footer was created), this is also slow. While the caret follows the mouse during the selection without any noticeable delay, there is an initial delay of a few seconds until the highlighting of the selected text is visible. After this initial delay, moving the mouse (without releasing the mouse button) updates the highlighting without any noticeable delay.
Selecting text using the keyboard (shift + arrow keys) is unaffected by this slowdown or delay.
Also after having clicked on the header or footer area, closing the document takes a lot longer.
Closing and reopening the document restores the initial behaviour.
When having the same document open in two separate windows, clicking the header/footer area in one window does not affect selecting text in another window.
Enabling or disabling hardware acceleration or anti-aliasing makes no difference.
Steps to Reproduce:
1. Create a "long" writer document (my sample: 500 pages). Adding forced page breaks is sufficient, the amount of text, formatting etc. is unimportant.
2. Click on the header or footer area of any page of the document.
3. Select any text anywhere in the document (not inside a header or footer) with the mouse.
There is a significant delay until the divider or the button to create a header/footer appears.
There is a significant delay until the selected text is highlighted.
There is no significant delay when clicking on the header/footer area when comparing to a short document.
There is no significant delay when selecting text as compared to doing so in the same document without having previously clicked on the header/footer area.
User Profile Reset: Yes
OpenGL enabled: Yes
This occurs for me in 220.127.116.11 on arch. I also compiled LibreOffice from source (master as of commit 05502f78ed0d406ff50d43a39c05f7bb990001e9) and experienced the same behaviour.
I followed the guide for Performance debugging using Callgrind and will attach some graphs.
What I can see from those when comparing a run where I clicked on the header area with a run where I didn't, selecting text and closing the document causes 500 calls (one for each page I suspect) to SwHeaderFooterWin::LinkStubFaderHandler(void*, Timer*) which take up about 80 % of the time spent selecting text or about 16 % when closing the document.
Created attachment 178681 [details]
Graphs from Callgrind analysis
Created attachment 178682 [details]
Sample document with 500 pages
Thank you for reporting the bug. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version. Change to RESOLVED WORKSFORME, if the problem went away.
I just checked version 7.3.1 and the behaviour with the attached sample document is the same.
I confirm it with
Version: 18.104.22.168 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
A significant delay until the divider or the button to create a header/footer appears.
A (short) delay until the selected text is highlighted.