Bug 133343 - Saving performance for a large complex drawing slow
Summary: Saving performance for a large complex drawing slow
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0
Keywords: perf
Depends on:
Blocks: Save
  Show dependency treegraph
 
Reported: 2020-05-24 10:39 UTC by Telesto
Modified: 2022-11-30 10:52 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file (2.14 MB, application/vnd.oasis.opendocument.graphics)
2020-05-24 10:39 UTC, Telesto
Details
Example file bit smaller (840.62 KB, application/vnd.oasis.opendocument.graphics)
2020-05-24 10:44 UTC, Telesto
Details
Flamegraph (466.51 KB, application/x-bzip)
2020-05-24 11:59 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-05-24 10:39:14 UTC
Description:
Saving performance for a large complex doc slow

Steps to Reproduce:
1. Open the attached file
2. Press Save

Actual Results:
Slow

Expected Results:
Could need some optimizations 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha1+ (x64)
Build ID: b587de60d4e6aa96238766272d94f1499b22f696
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-05-24 10:39:30 UTC
Created attachment 161225 [details]
Example file
Comment 2 Telesto 2020-05-24 10:41:28 UTC
A flamegraph would be nice.. 

You may need to remove number of pages.. to get a graph within a reasonable time.. It are all copy's of the same.. so shouldn't change the outcome
Comment 3 Telesto 2020-05-24 10:44:13 UTC
Created attachment 161226 [details]
Example file bit smaller
Comment 4 Julien Nabet 2020-05-24 11:59:11 UTC
Created attachment 161231 [details]
Flamegraph

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today.
Comment 5 Xisco Faulí 2020-06-29 15:34:20 UTC
it takes 2 minutes and 4 seconds for me in

Version: 7.1.0.0.alpha0+
Build ID: 42bf9bdf3d551eb59604f952204c49f7d7a1e913
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Xisco Faulí 2020-06-29 15:35:35 UTC
(In reply to Julien Nabet from comment #4)
> Created attachment 161231 [details]
> Flamegraph
> 
> Here's a Flamegraph retrieved on pc Debian x86-64 with master sources
> updated today.

Hi Noel,
I thought you might be interested in this flamegraph
Comment 7 Noel Grandin 2020-09-11 11:29:23 UTC
We spend about 50% of the save time traversing every single property of every single object in the diagram calculating something called AutoStyles.

Unfortunately, I do not see any relatively simple way to improve this.
Comment 8 Telesto 2020-09-12 10:19:11 UTC
(In reply to Noel Grandin from comment #7)
> We spend about 50% of the save time traversing every single property of
> every single object in the diagram calculating something called AutoStyles.
> 
> Unfortunately, I do not see any relatively simple way to improve this.

Luckily not affected, only the reporter :-)
Comment 9 QA Administrators 2022-09-13 03:33:14 UTC Comment hidden (obsolete)
Comment 10 Roman Kuznetsov 2022-09-16 15:45:51 UTC
40 sec and blinking progress bar in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: bff60eadeac348024849d710690435ee9580831b
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
Comment 11 Commit Notification 2022-11-28 18:18:45 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/af826c85c2eb519b9a3f76099c0e70604d9679e2

tdf#133343 improve perf of OUString::operator=(&&)

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2022-11-30 07:39:32 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/01a3cc1e55034f7703219d4bbb209de7c37bf07b

tdf#133343 collect autostyle prop names

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 BogdanB 2022-11-30 10:45:34 UTC Comment hidden (obsolete)
Comment 14 BogdanB 2022-11-30 10:52:08 UTC
61 seconds in 
Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: bfe33d42a2381bce194cc6fe15b830902f7c8443
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded

53 seconds in
Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded

From the moment I press Save until the message "Save document" dissapear from the bottom of the page.