Bug 114864 - Changing the Image angle with the angle rotation tool is sometimes a bit laggy and causes high CPU utilization
Summary: Changing the Image angle with the angle rotation tool is sometimes a bit lagg...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2018-01-06 17:00 UTC by Telesto
Modified: 2021-12-07 11:26 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (438.21 KB, application/vnd.oasis.opendocument.text)
2018-01-06 17:01 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-01-06 17:00:47 UTC
Description:
Changing the Image angle with the angle rotation tool is sometimes a bit laggy and causes high CPU utilization

Steps to Reproduce:
1. Open the attached file
2. Format -> Image -> Properties -> Image Tab
3.  Use the angle dragging tool and monitor CPU usage while changing

Actual Results:  
High CPU usage. 

Expected Results:
Same as when typing the angle into the 'textbox'. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.0.0.alpha0+
Build ID: a9b202a6b7000e7af34f2a639ca207122a3968bf
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-12-26_23:10:23
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2018-01-06 17:01:06 UTC
Created attachment 138919 [details]
Example file
Comment 2 Telesto 2018-01-06 17:10:37 UTC
Hmm, probably not a bug in hindsight. The rotation is mostly directly applied to the image, for example when doing this using the toolbar instead.
Comment 3 Buovjaga 2018-01-29 17:38:48 UTC
(In reply to Telesto from comment #2)
> Hmm, probably not a bug in hindsight. The rotation is mostly directly
> applied to the image, for example when doing this using the toolbar instead.

Not sure what you mean as there is no preview at all when using the dialog. The old toolbar only has a preview of the box.
The only one with a real-time preview is the new Sidebar rotation tool.

I confirm it uses about 50% CPU for me with the handle and above 20 with the input box.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: 2d8f17565ebe867210f5769851d91b2e7b612a8f
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on January 27th 2018
Comment 4 Telesto 2018-01-29 19:31:12 UTC
(In reply to Buovjaga from comment #3)
> (In reply to Telesto from comment #2)
> > Hmm, probably not a bug in hindsight. The rotation is mostly directly
> > applied to the image, for example when doing this using the toolbar instead.

The dialog could (speculation) be using the same code as the real-time preview is the new Sidebar rotation tool. Which would mean that a real-time preview is generated somewhere in the background..
Comment 5 Buovjaga 2018-01-30 06:00:36 UTC
(In reply to Telesto from comment #4)
> (In reply to Buovjaga from comment #3)
> > (In reply to Telesto from comment #2)
> > > Hmm, probably not a bug in hindsight. The rotation is mostly directly
> > > applied to the image, for example when doing this using the toolbar instead.
> 
> The dialog could (speculation) be using the same code as the real-time
> preview is the new Sidebar rotation tool. Which would mean that a real-time
> preview is generated somewhere in the background..

Your speculation turned out to be correct as the rotation tool is not in the dialog yet in 5.4.

Adding Armin to CC: I wonder why there is not a real-time preview when using the image properties dialog yet it still hammers the CPU?
Comment 6 QA Administrators 2019-01-31 03:48:20 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2021-12-07 11:26:32 UTC
Now at a normal speed of changing the angle the CPU hovers at 10% on the same computer as in my 2018 test. I can only get it to 50%, if I wiggle the angle control unrealistically quickly like a crazy person. Linux 7.4 bibisect repo.