[Libreoffice-bugs] [Bug 141556] Ongoing 100% CPU usage after opening document

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Apr 9 02:18:24 UTC 2021


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

--- Comment #4 from Luke Deller <luke at deller.id.au> ---
I believe what is happening here is the idle layout processing keeps getting
interrupted on page 15.  Each time it is invoked, it resumes from page 15 but
does not progress far enough before being interrupted again, so next time it
resumes back at the same point - so it never finishes.

There was a stopwatch timer introduced in commit
383032c50a3e3354f04200ce984a47ab9d2c5c67 for tdf#123583, which interrupts idle
processing every 50 milliseconds.  To test my explanation of the problem, I
tried extending this timer to 60 seconds, and that does indeed fix the problem
- but this is not the right fix because the application is unresponsive for too
long when the document is opened because the idle task is not being interrupted
at all.

Instead I tried reverting commit 383032c50a3e3354f04200ce984a47ab9d2c5c67,
which brings us back to the previous behaviour where idle processing is only
interrupted if there is some input event.  In theory this sounds great, but I
saw that the idle processing was still being interrupted many times per second
causing the same symptoms.  Debugging with gdb, I saw this was a TIMER event.

This is very similar to problems addressed previously in commit
b4f35a7450830979b937ec6ae3b6d638302093d2 (2015) and commit
6160127ba9b03b991736e0157c2d134795fa196f (2005), which filter out TIMER events
so that they will not interrupt idle processing - but these commits missed one
spot!  This line:
https://git.libreoffice.org/core/+/refs/changes/90/18590/2/sw/source/core/layout/layact.cxx/#2168

When I apply a similar change onto this line, the present bug is fixed for me:
CPU usage is high for about 12 seconds then drops to zero.  Also this
(re-)fixes tdf#123583

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210409/63fefc40/attachment.htm>


More information about the Libreoffice-bugs mailing list