Bug 105016 - CPU usage for dragging an jpg image has nearly doubled since LibO44(63)
Summary: CPU usage for dragging an jpg image has nearly doubled since LibO44(63)
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, perf, regression
Depends on:
Blocks:
 
Reported: 2016-12-31 09:28 UTC by Telesto
Modified: 2017-01-06 16:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (149.08 KB, application/vnd.oasis.opendocument.graphics)
2016-12-31 09:28 UTC, Telesto
Details
Screencast LO4463 (1.01 MB, video/x-msvideo)
2016-12-31 09:29 UTC, Telesto
Details
Screencast LO5221 (659.50 KB, video/x-msvideo)
2016-12-31 09:30 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-12-31 09:28:20 UTC
Description:
CPU usage while dragging an image in LibO4463 hoovers around 22%. With Lib5.4 it's around 35-38%

Steps to Reproduce:
1.Open attached file
2.Drag it around a bit (see screen-cast)

Actual Results:  
CPU usage is hoovering around 35-38%

Expected Results:
Performance should (at least) be the same as in LibO4463


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in:
Version: 5.4.0.0.alpha0+
Build ID: a7c51323b7343f82b5aea6098f5d5e31a8bad0e9
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-29_23:35:20
Locale: nl-NL (nl_NL); Calc: CL

and in
Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: en-US (nl_NL)

but not in
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2016-12-31 09:28:46 UTC
Created attachment 130049 [details]
Example file
Comment 2 Telesto 2016-12-31 09:29:40 UTC
Created attachment 130050 [details]
Screencast LO4463
Comment 3 Telesto 2016-12-31 09:30:09 UTC
Created attachment 130051 [details]
Screencast LO5221
Comment 4 Buovjaga 2017-01-05 08:21:29 UTC
Yeah, CPU is getting hit pretty hard.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 1a58cdf8af1aba52ce0a376666dd7d742234d7cf
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on January 4th 2016
Comment 5 raal 2017-01-06 15:51:13 UTC
This seems to have begun at the below commit.
Adding Cc: to Michael Meeks; Could you possibly take a look at this one? Thanks
 4641f2d79cb0e818208dec88b56f7e1d41c6dc1d is the first bad commit
commit 4641f2d79cb0e818208dec88b56f7e1d41c6dc1d
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue May 26 13:05:42 2015 -0500

    source 230a02dbb5b83ff4af1a31489e340f1fabb46096
author    Michael Meeks <michael.meeks@collabora.com>    2014-10-16 11:46:11 (GMT)
committer    Caolán McNamara <caolanm@redhat.com>    2015-03-12 11:41:52 (GMT)
commit    230a02dbb5b83ff4af1a31489e340f1fabb46096 (patch)
tree    4b1e2919e0b5edcd697704e9c7afcbf1f8c1260b
parent    86a547e33bab2a89513385c5af535a6099526616 (diff)
vcl: parallelize image scaling.
Comment 6 Michael Meeks 2017-01-06 16:23:10 UTC
Well - this is just one of those things I think. We now parallelise image scaling - so we do it far more quickly; as such - we can process more mouse events in the same time, and thus render more interpolated images, which in turn takes more CPU time. I would expect 100% CPU usage if you've got enough mouse events though. IIRC we also take advantage of this to do a higher-quality interpolation in some cases, but I forget which.

So -> not really a bug =) Of course as/when/if you can use OpenGL it should all be done on the GPU with little to no CPU cost but ... that's rather dependent on the hardware & drivers used. Thanks for reporting.