Bug 78067 - Poor ODP save caused by swapping in all images (pointlessly)
Summary: Poor ODP save caused by swapping in all images (pointlessly)
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: perf
Keywords:
Depends on: Image-Caching
Blocks: Save
  Show dependency treegraph
 
Reported: 2014-04-29 08:45 UTC by Michael Meeks
Modified: 2019-09-08 07:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
export- showing a ton of reading of images (but no writing) (376.25 KB, image/png)
2014-04-29 08:45 UTC, Michael Meeks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2014-04-29 08:45:07 UTC
It takes me a very long time to save my 88 slide deck (much longer than to load it) - you can load it as hybrid PDF here:

http://people.gnome.org/~michael/data/2014-04-26-story-of-libreoffice.pdf

Profiling it in callgrind overnight (yes it takes that long ;-) it turns out that ~all of that time is consumed -loading- and de-compressing the images - there is ~zero cost for exporting them (so I can only think that the binary data is copied directly across to the new container - which is good).

That is really silly =) and (perhaps) another example of the really unfortunate image handling design we have [ though it could just be a silly bug I guess ].
Comment 1 Michael Meeks 2014-04-29 08:45:49 UTC
Created attachment 98165 [details]
export- showing a ton of reading of images (but no writing)
Comment 2 Michael Meeks 2014-05-24 20:55:45 UTC
Interestingly the slowest conversion in our callgrind tests at:

http://dev-builds.libreoffice.org/callgrind_report/

is 051_fdo#73300.odt-convert - whose profile shows a huge amount of time spend loading, un-compressing and checksumming images - but virtually no time converting/exporting them. Which is perhaps another interesting data point.
Comment 3 QA Administrators 2015-06-08 14:42:54 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2016-09-20 10:02:02 UTC Comment hidden (obsolete)
Comment 5 Michael Stahl (CIB) 2017-11-23 21:10:12 UTC
this should be substantially improved with:

commit a03a0cfb1e41c357950a40623c2f8b6f5507e97d
Author:     Michael Stahl <mstahl@redhat.com>
AuthorDate: Fri Jul 14 14:32:22 2017 +0200

    sw: make SwGrfNode::mpReplacementGraphic swappable
    
    Same as previous commit, but for sw.
    
    Change-Id: Id678de3f512204437e37aaedf24e24aff7a9e592

commit c96e3e226fe4eb8f25c54cce4d653d12eda63ce2
Author:     Michael Stahl <mstahl@redhat.com>
AuthorDate: Wed Jul 12 15:14:48 2017 +0200

    svx: make SdrGrafObj::mpReplacementGraphic swappable
    
    These GraphicObjects clog up the GraphicManager cache so it's
    effectively useless.
    
    Round-tripping the ML bugdoc, this doesn't provide much of a
    speed-up by itself, but together with the previous fix it goes from
    3:00 to 1:30 (in an optimized build).
    
    Change-Id: If52e176c790b94ffef9984be53376a34345b06e3

commit b3992ddcd13082a934246b717ae22f57394e6533
Author:     Michael Stahl <mstahl@redhat.com>
AuthorDate: Thu Jul 13 21:58:48 2017 +0200

    xmloff: ODF export: fix redundant setting of GraphicStreamURL swapping
    
    XMLShapeExport::ImpExportGraphicObjectShape() unnecessarily swaps out
    the GraphicObject by calling setPropertyValue("GraphicStreamURL")
    even if the URL didn't actually change from what was retrieved
    just a couple lines earlier, incidentally swapping it in too.
    
    Well actually it isn't really swapped out, it's marked as auto-swapped,
    but nevertheless on getting the "ReplacementGraphicURL" property
    its Graphic will be replaced by swapping it in again.
    
    So don't do that, then it's only swapped in once.
    
    This speeds up round-tripping the ML bugdoc from 3:20 to 3:00.
    
    Change-Id: I65a211a0c225444c06d5516df9c6716360be46c0
Comment 6 QA Administrators 2018-11-24 03:43:56 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug
Comment 7 Julien Nabet 2019-05-30 07:13:05 UTC
On pc Debian x86-64 with master sources updated today, it takes less time to save the pdf file in another file than loading it.
(perhaps 1/2 min to load, 30 secs to save with Ryzen 2600 + 32GB)

Michael Meeks: any update with a recent LO version and following Michael Stahl's comment?