Bug 113468 - Sudden High CPU Usage by "Idle" LO
Summary: Sudden High CPU Usage by "Idle" LO
Status: RESOLVED DUPLICATE of bug 106958
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.4.2.2 release
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2017-10-26 20:05 UTC by Jon R Kibler
Modified: 2017-11-13 14:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon R Kibler 2017-10-26 20:05:35 UTC
Note: This may (?) be related to bug 113467 in which I'm having a different performance issue.

Three or four times recently, I will be working in another app and suddenly hear the fans on my MBP start to rev up. Checking Activity Monitor, I find the LibreOffice is using anywhere from 110% to 180% of the CPU.

This has only happened with LibreOffice has been open but idle. One time, I had started the app and it was sitting on StartCenter when I got interrupted by a text and switched to my message app (LO was on a different Mac desktop space). Other times, I have had open writer documents, but had not been editing them for some time.

I have not had a problem switched from whatever I am doing back to LO (although it may be a slow switch) and closing all the documents and exiting LO. I have noticed on Activity Monitor, that closing documents has no effect on CPU and it does not lower CPU usage until I quit LO.
Comment 1 Xisco Faulí 2017-10-26 22:39:06 UTC Comment hidden (obsolete)
Comment 2 Telesto 2017-10-27 08:02:53 UTC
It could be bug 103571 (or bug 103126)
Comment 3 Jon R Kibler 2017-10-27 09:29:05 UTC
The problem seems to occur at random -- nothing in common between incidents. 

If you can please provide some instructions as to how to collect data regarding what threads (or whatever) are running and/or any other debug information you require, I would be glad to do that the next time the problem occurs.

I would need the info for a Mac.

Thanks!
Comment 4 Jon R Kibler 2017-10-27 09:45:10 UTC
(In reply to Jon R Kibler from comment #3)
> The problem seems to occur at random -- nothing in common between incidents. 
> 
> If you can please provide some instructions as to how to collect data
> regarding what threads (or whatever) are running and/or any other debug
> information you require, I would be glad to do that the next time the
> problem occurs.
> 
> I would need the info for a Mac.
> 
> Thanks!

I just read the other two bugs which were proposed as possibly related and I can probably add some useful information.

I do have Dock in Auto-Hide mode.

The problem does occur after sleep, but not immediately, and the space in which LO is running is not visible (is that logically equivalent to minimizing, although it is not minimized to the Dock?) and has not been returned to after sleep.

The hardware specs are:
  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro11,3
  Processor Name:	Intel Core i7
  Processor Speed:	2.8 GHz
  Number of Processors:	1
  Total Number of Cores:	4
  L2 Cache (per Core):	256 KB
  L3 Cache:	6 MB
  Memory:	16 GB
  Boot ROM Version:	MBP112.0138.B40
  SMC Version (system):	2.19f12
Comment 5 Alex Thurgood 2017-10-27 14:59:36 UTC
@Jon : seems to me that at least some of what you describe here, and equally in bug 113467, has already been referenced in the See Also bugs I've added to this report.
Comment 6 Alex Thurgood 2017-10-27 15:02:19 UTC
@Jon : to collect debug information you need a debug build. As far as I know, none are being provided at the current time in the daily builds made available for LibreOffice on OSX.

The only other way to obtain useful debug information is to build LO yourself from source.

I suppose theoretically, you could try analysing a normal build in Instruments.app (part of the XCode package) with a time profile trace or a core profile trace, although without symbols and debug code, the results are probably going to be a bit limited.
Comment 7 Jon R Kibler 2017-10-29 15:07:50 UTC
I was asked to see if I saw any of the same issues as other bugs posted. Here are my results:

Bug 107113 -- agree performance at cold start is MUCH slower than OO. I have also noticed that the longer LO runs, the slower it seems to become.

Bug 106958 -- I am also having document freezes while typing. Clicking icons does not seem to help.

Bug 106154 -- I occasionally see this behavior, but not as frequently as this bug report. However, one place that it is consistently slow is in replacing misspellings: You select the replacement word on the right-click menu, and it hangs anywhere from 2 to >5 seconds before replacing the word and closing the menu.

Bug 104802 -- I am not seeing this particular behavior, but I do see it sometimes freeze when clicking in a new cell and start typing. Under that circumstance, I also notice that the typing lags showing up in the formula edit box on the tool bar, and the full text of typing never shows up until you select a different cell then go back to that cell... but I think the formula bar echo is probably a different issue.

Bug 103571 -- I am seeing some of this, which I describe in bug 113467 which I also have open.

Bug 103252 -- If LO has been previously running, and you quit it, then restart, from the time that LibreOffice appears in the menu bar and StartCenter appears averages 6 seconds. However, if you start LO after a clean login (not switch user) it can take over 20 seconds to appear.

Bug 87013 -- Reading this, my thought is this is not a LO bug. I have several NAS drives, and if they are mounted but have gone to sleep, they slow ANY application down when trying to do disk access that one would think is limited to the internal HDD, but for some reason macOS also waits to spin up the NAS drives before responding. This is something that got A LOT worse with Sierra. My thought is that with LO needs some shared library that is not loaded in memory, it hangs until all the NAS drives are spun up. That said, I have tested my LO problem with all NAS unmounted and that does not seem to solve the problem.

Bug 113104 -- Have not seen this issue.
Comment 8 Jon R Kibler 2017-10-29 15:11:22 UTC
Reading through all these bugs and commenting has left me with a thought: Sierra -- at least from the user's perspective -- changed the way the O/S handles spellchecking.

I do have spelling and grammar checking turned on. I'm wondering if that could be at least part of this problem -- especially the freezes when typing: Is spelling checking trying to occur and there is simply a delay in looking up some word?

I am going to turn both off and will report back in a couple days.
Comment 9 Jon R Kibler 2017-10-29 15:16:31 UTC
(In reply to Jon R Kibler from comment #8)
> Reading through all these bugs and commenting has left me with a thought:
> Sierra -- at least from the user's perspective -- changed the way the O/S
> handles spellchecking.
> 
> I do have spelling and grammar checking turned on. I'm wondering if that
> could be at least part of this problem -- especially the freezes when
> typing: Is spelling checking trying to occur and there is simply a delay in
> looking up some word?
> 
> I am going to turn both off and will report back in a couple days.

OOPS! I meant this comment for  bug 113467. But, will leave it here.
Comment 10 Alex Thurgood 2017-11-13 14:10:09 UTC

*** This bug has been marked as a duplicate of bug 106958 ***