https://bugs.documentfoundation.org/show_bug.cgi?id=147802

            Bug ID: 147802
           Summary: Clicking on header or footer area in long writer
                    document takes a long time and slows down text
                    selection and closing document
           Product: LibreOffice
           Version: 7.2.5.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
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.

Actual Results:
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.

Expected Results:
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.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
This occurs for me in 7.2.5.2 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to