Bug 104030 - macOS: CPU usage of the Database Wizard screen when active (on top)
Summary: macOS: CPU usage of the Database Wizard screen when active (on top)
Status: RESOLVED DUPLICATE of bug 114839
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: MacOS-Performance Database-Wizard
  Show dependency treegraph
 
Reported: 2016-11-19 14:04 UTC by Telesto
Modified: 2018-02-12 19:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
CPU usage database wizard (4.42 MB, video/quicktime)
2016-11-19 14:06 UTC, Telesto
Details
LLDB Backtrace (1011.36 KB, text/plain)
2016-11-19 14:23 UTC, Telesto
Details
Xcode instruments time profile screenshot (547.11 KB, image/png)
2017-10-16 12:02 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-11-19 14:04:56 UTC
Description:
LibreOffice in consuming lots of CPU power doing nearly nothing at all. 
Just having a database wizard activated on top leads to an increased CPU consumption (around 7%). Maximizing the database wizard screen (screen-filling) lets the CPU spike to around (25%) for a few seconds 

Likely related: Just hovering over the Start Center buttons does increase CPU usage also a lot.

Steps to Reproduce:
1.Start LibreOffice
2.Click Base database in Start Center
3 Monitor CPU usage when Database Wizard is on top/'activated' 

Actual Results:  
CPU usage around 7%

Expected Results:
CPU usage around zero


Reproducible: Always

User Profile Reset: YES

Additional Info:
Version: 5.3.0.0.alpha1+
Build ID: 074f0ab1d76f16fe92493868e2f2de75e67792ef
CPU Threads: 4; OS Version: Mac OS X 10.12.1; UI Render: default; Layout Engine: new; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-11-15_00:29:07
Locale: en-US (en_US.UTF-8); Calc: group


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-19 14:06:06 UTC
Created attachment 128868 [details]
CPU usage database wizard
Comment 2 Telesto 2016-11-19 14:23:01 UTC
Created attachment 128871 [details]
LLDB Backtrace

Version: 5.3.0.0.alpha1+
Build ID: 074f0ab1d76f16fe92493868e2f2de75e67792ef
CPU Threads: 4; OS Version: Mac OS X 10.12.1; UI Render: default; Layout Engine: new; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-11-15_00:29:07
Locale: en-US (en_US.UTF-8); Calc: group

Backtrace contains a warning:
@"WARNING: nextEventMatchingMask should only be called from the Main Thread! This will throw an exception in the future.
Comment 3 Telesto 2016-11-19 15:20:56 UTC Comment hidden (obsolete)
Comment 4 Telesto 2016-11-19 15:52:53 UTC Comment hidden (obsolete)
Comment 5 Telesto 2016-11-19 19:17:42 UTC Comment hidden (obsolete)
Comment 6 Alex Thurgood 2016-11-21 09:52:02 UTC
Confirming on

Version: 5.3.0.0.alpha1+
Build ID: e1af58c1260f442c2731ae8a705deba732246b1d
CPU Threads: 2; OS Version: Mac OS X 10.12.1; UI Render: default; Layout Engine: new; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 7 Telesto 2017-10-08 19:22:12 UTC
Still a repro with master~2017-10-08_02.51.19_LibreOfficeDev_6.0.0.0

Not limited to Database Wizard screen. Also happening with the character/page dialog
Comment 8 Telesto 2017-10-16 12:02:42 UTC
Created attachment 137012 [details]
Xcode instruments time profile screenshot

Could this be related to argb32_image c.q. CGSBlendRGBA8888toRGBA8888 conversion 
in the background. It shows up in the time profile

There is some talk about argb32_image on the web:

* http://robert.ocallahan.org/2010/05/cglayer-performance-trap-with-isflipped_03.html
* https://stackoverflow.com/questions/7560979/cgcontextdrawimage-is-extremely-slow-after-large-uiimage-drawn-into-it

And I'm seeing 'isflipped' quite a lot here: https://opengrok.libreoffice.org/xref/core/vcl/quartz/salgdicommon.cxx
Comment 9 Telesto 2017-10-16 12:09:52 UTC
Caolán, any ideas about comment 8?
Comment 10 Caolán McNamara 2017-10-16 15:14:37 UTC
no idea
Comment 11 Telesto 2018-02-12 19:27:19 UTC

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