Bug 122537 - Image handling - scaling big pictures is too slow (writer)
Summary: Image handling - scaling big pictures is too slow (writer)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: iOS Editor (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other iOS
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-07 16:24 UTC by Nicolas Christener
Modified: 2020-10-23 06:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Christener 2019-01-07 16:24:12 UTC
Description:
Taking a picture directly into a writer document using the iOS camera (Insert > local picture > photo or video...) on my iPad Pro creates a jpg with a resolution of 4032x3024 (1.8MB).

Resizing such a picture sometimes takes up to 10s.

I expect, that user will take pictures through the said functionality so either the scaling needs to be much faster or the picture needs to be scaled down before it's actually added into the document.

Steps to Reproduce:
1. Create a writer document in the iOS app
2. Take a picture through Insert > local picture > photo or video...
3. Resize the picture

Actual Results:
In most of the cases it takes far more than 5s to resize the picture (up to 10s).

Expected Results:
The picture is ~instantly resized if it takes longer a "loading" indicator should be shown so the user knows, that something is happening.


Reproducible: Sometimes


User Profile Reset: No



Additional Info:
Comment 1 Telesto 2019-01-07 19:34:33 UTC
@Tor
Unconfirmed, but it's about IOS.. so you might be interested..
Comment 2 Xisco Faulí 2019-02-07 17:10:15 UTC
Putting it to new...
Comment 3 Michael Meeks 2019-02-25 10:16:57 UTC
We'll profile that. We're a bit behind on profiling. There is also a hold-off problem with rapid typing I want to address here =) Thanks !
Comment 4 How can I remove my account? 2019-02-28 09:47:30 UTC
Added one improvement (only in the cp-6.0 branch at the moment, in gerrit for master: https://gerrit.libreoffice.org/#/c/68488/ ) that should make adding images faster.

Further debugging and profiling is hindered by assertion failures and "The Web Content process was terminated" things. Investigating those first.
Comment 5 Commit Notification 2019-02-28 16:17:38 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/5bd1ac0083bf6047fd1b977f24ae5ffb7018f2a8%5E%21

tdf#122537: Use "best speed" instead of default compression level on iOS

It will be available in 6.3.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 6 How can I remove my account? 2019-03-21 15:51:28 UTC
The change above drops the use of a (huge) semi-transparent SVG preview that was displayed while it was being resized or rotated. Now only the dotted image border moves or rotates during the operation. Is the time it takes for the resized / rotated image to be redrawn once one lifts the finger from the handle a problem?
Comment 7 How can I remove my account? 2019-03-22 15:34:09 UTC
Replying to myself, yeah, it is horribly slow for the resized image to show up once one lets go of the handle.
Comment 8 Xisco Faulí 2019-06-26 09:09:24 UTC
Dear Tor Lillqvist,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 9 Nicolas Christener 2020-10-23 05:26:38 UTC
Testing this with the new major version, 6.4.0 (5) on iOS 14.1 I am happy with the scaling speed by now. I believe we can close this issue for now.

Thanks a lot to the Collabora team and especially Tor for taking care of this!