Bug 123361 - Compressing a Large PNG image is rather slow
Summary: Compressing a Large PNG image is rather slow
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, implementationError, perf
Depends on:
Blocks: Image-Compression
  Show dependency treegraph
 
Reported: 2019-02-11 15:49 UTC by Telesto
Modified: 2019-06-26 07:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (2.24 MB, application/vnd.oasis.opendocument.graphics)
2019-02-11 15:50 UTC, Telesto
Details
Callgrind output from master (2.45 MB, application/x-xz)
2019-02-18 12:11 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2019-02-11 15:49:55 UTC
Description:
Compressing a Large PNG image is rather slow

Steps to Reproduce:
1. Open the attached file
2. Right click the PNG 
3. Compress to JPG: 600 DPI

Actual Results:
takes 20 seconds or so

Expected Results:
2 seconds


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.0.0.alpha0+
Build ID: 0b21f6556b6fff76290d1095089da89532365215
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 1 Telesto 2019-02-11 15:50:19 UTC
Created attachment 149162 [details]
Example file
Comment 2 Durgapriyanka 2019-02-13 17:24:32 UTC
Thank you for reporting the bug. When I compress the PNG image to JPG and click OK, LO becomes unresponsive and crashes.

Version: 6.3.0.0.alpha0+
Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 3 Durgapriyanka 2019-02-13 17:44:40 UTC
After trying it for several times, I find that it takes about 85 secs to compress.

Version: 6.3.0.0.alpha0+
Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 4 Buovjaga 2019-02-17 15:00:53 UTC
Also in 4.3.0 (Win 10)
Comment 5 Buovjaga 2019-02-18 12:11:07 UTC
Created attachment 149368 [details]
Callgrind output from master

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: e77beebb0d839f5dc0d4f9c4fd7cc9b7ccfd0175
CPU threads: 8; OS: Linux 4.20; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 16 February 2019
Comment 6 Noel Grandin 2019-06-25 13:37:09 UTC
The time here is all in the nice rescaling we do these days, and should be fixed with commit d1c075c6a7002521129bddb5860f20746f168a29, which I did to fix
    https://bugs.documentfoundation.org/show_bug.cgi?id=125892
Comment 7 Xisco Faulí 2019-06-26 07:27:55 UTC
in

Version: 6.1.0.0.alpha1+
Build ID: 3a801799536e6870f2fb111b1cc00b9575a35a39
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

it takes 14 seconds for me, while in

Version: 6.4.0.0.alpha0+
Build ID: fe855eda54faf6196ad9dea12d8dc090b6d6c1da
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

it takes 7 seconds... Setting to VERIFIED.

@Noel, thanks for fixing this issue!!