Bug 103864 - macOS: high CPU when scrolling around
Summary: macOS: high CPU when scrolling around
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: MacOS-Performance Scrolling-Performance
  Show dependency treegraph
 
Reported: 2016-11-11 13:11 UTC by Telesto
Modified: 2023-12-06 10:16 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen Recording (5.24 MB, video/quicktime)
2016-11-11 13:12 UTC, Telesto
Details
LLDB Backtrace with debug symbols (1.25 MB, text/plain)
2016-11-11 13:15 UTC, Telesto
Details
LLDB Backtrace with debug symbols (1.24 MB, text/plain)
2016-11-11 13:19 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-11-11 13:11:45 UTC
Description:
When moving a (empty) page around (scrolling horizontally or vertically) the CPU usage  quite excessive on a Mac. I haven't seen the same behavior on Windows. 


Steps to Reproduce:
1.Scrolling up and down, left and right 
2.
3.

Actual Results:  
High CPU usage when scrolling

Expected Results:
Low CPU usage when scrolling


Reproducible: Always

User Profile Reset: YES

Additional Info:


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14
Comment 1 Telesto 2016-11-11 13:12:25 UTC
Created attachment 128657 [details]
Screen Recording
Comment 2 Telesto 2016-11-11 13:15:46 UTC
Created attachment 128658 [details]
LLDB Backtrace with debug symbols

A backtrace taken at the moment the CPU-usage spikes.
Comment 3 Telesto 2016-11-11 13:19:22 UTC
Created attachment 128659 [details]
LLDB Backtrace with debug symbols
Comment 4 Telesto 2016-11-11 13:50:01 UTC
Almost forgotten. I did the debugging with: 
Version: 5.3.0.0.alpha1+
Build ID: 64a708cba9b954afe3331f63c58218eb53b3d0ce
CPU Threads: 4; OS Version: Mac OS X 10.12.1; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: group

I also tested LO 5.2.3.1 and 4.3.7.2 with same results.
Comment 5 Telesto 2016-11-11 14:02:36 UTC
I also found it in LibreOffice 3.3.0.4 and OpenOffice 4.1.3
Comment 6 Telesto 2016-11-13 15:15:54 UTC
Dragging around a shape or symbol (for example a smiley face) has the same effect.
Comment 7 steve 2016-11-13 15:41:05 UTC
scrolling wild with trackpad (up down left right) on a late 2012 imac continuously adds to CPU usage. went up from idle to 40% and after continuing for some time (~20 sec) to 90%.

as soon as user stops to scroll around, CPU goes back to normal.

confirmed → NEW
Comment 8 Telesto 2016-11-14 13:36:26 UTC
The same issue also exists in Writer
Comment 9 Telesto 2016-11-19 16:09:09 UTC
Within the backtrace I noticed:
- "cannot write pidfile "
- "cannot open pidfile "
- "cannot get pidfile URL from path"
Comment 10 QA Administrators 2018-10-11 03:02:59 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2020-10-11 04:13:48 UTC Comment hidden (obsolete)
Comment 12 steve 2021-09-10 07:54:36 UTC
macOS 11.5.2
LO 7.2.0.4

1. open calc
2. scroll up / down or left / right continuously with trackpad
3. CPU goes to 96%

Fans do not spin up, but CPU usage at that level probably not expected.
Comment 13 Telesto 2021-09-10 14:30:33 UTC
(In reply to steve from comment #12)
> macOS 11.5.2
> LO 7.2.0.4
> 
> 1. open calc
> 2. scroll up / down or left / right continuously with trackpad
> 3. CPU goes to 96%
> 
> Fans do not spin up, but CPU usage at that level probably not expected.

More interested how the Skia Raster backend behaves :-). I would expect this to be fixed
Comment 14 Luboš Luňák 2021-11-18 14:05:40 UTC
Please try this with a developer build from https://dev-builds.libreoffice.org/daily/master/ [*]. Check with option Tools->Options->View->Use Skia for all rendering both enabled and disabled, and when enabled with both Force Skia software rendering enabled and disabled.

[*] Today's build may still have some rendering problems in dialogs, so tomorrow's should be better, but even today's should be usable for testing this bug.
Comment 15 steve 2021-11-19 15:21:48 UTC
✓ Use Skia for all rendering
    ✓ Force Skia software rendering
Scrolling: CPU ~94%

✓ Use Skia for all rendering
    x Force Skia software rendering
Scrolling: CPU ~12%

x Use Skia for all rendering
    x Force Skia software rendering
Scrolling: CPU ~100%

Fair to call this fixed, Luboš? Telesto?
Comment 16 Roman Kuznetsov 2021-11-19 19:14:37 UTC
30-40% of CPU using in


Version: 7.3.0.0.alpha1+ / LibreOffice Community
Build ID: 11800469cc7b3a40c42410be93a12e5107db0efb
CPU threads: 4; OS: Mac OS X 10.16; UI render: Skia/Raster; VCL: osx
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: threaded

+ - the same without Skia 

Version: 7.3.0.0.alpha1+ / LibreOffice Community
Build ID: 11800469cc7b3a40c42410be93a12e5107db0efb
CPU threads: 4; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: threaded

mac mini 2014, fullHD display
Comment 17 steve 2021-12-02 19:09:50 UTC
@Roman: could you also test the third option "Skia/Metal" which translates to Preferences > View > Skia enabled (but force skia software disabled).
Comment 18 Roman Kuznetsov 2021-12-05 10:24:18 UTC
(In reply to steve from comment #17)
> @Roman: could you also test the third option "Skia/Metal" which translates
> to Preferences > View > Skia enabled (but force skia software disabled).

around 20% CPU load in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 2934472ab888ebfe64a153984af2902fac63a7a0
CPU threads: 4; OS: Mac OS X 10.16; UI render: Skia/Metal; VCL: osx
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: threaded
Comment 19 QA Administrators 2023-12-06 03:17:51 UTC Comment hidden (obsolete)
Comment 20 steve 2023-12-06 10:16:28 UTC
There were recently fixed for skia when scrolling on macOS