Bug 135390 - Linked Graphic on localhost slows freezes application for several seconds when not available
Summary: Linked Graphic on localhost slows freezes application for several seconds whe...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: Regressions-imageHandling
  Show dependency treegraph
 
Reported: 2020-08-02 16:47 UTC by Eelco de Vlieger
Modified: 2023-09-02 03:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document with linked localhost graphic on page 5 (9.86 KB, application/vnd.oasis.opendocument.text)
2020-08-02 16:50 UTC, Eelco de Vlieger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eelco de Vlieger 2020-08-02 16:47:54 UTC
Description:
Linked Graphic on localhost slows freezes application for several seconds when not available.

I was sent a file by someone else, linking multiple local web server images. Scrolling through this document froze the application for multiple seconds, as well as freezing other LibreOffice application instances.

I have a fairly high spec PC (32 thread, 64GB ram) which was hardly under any load. Perhaps the resolving of this linked graphic can be done asynchronously to prevent blocking the user.

Steps to Reproduce:
1. Insert > Image
2. Enter Localhost image URL as 'File Name' and check the 'Link' checkbox > confirm 'Keep Link'
3. Save and close document
4. Stop localhost server
5. Re-open document, scrolling over the localhost linked graphic will freeze Writer for several seconds. It also freezes other open LibreOffice Writer or Calc instances.

Actual Results:
Scrolling over the localhost linked graphic will freeze Writer for several seconds. It also freezes other open LibreOffice Writer or Calc instances.

Expected Results:
No delay, should just be an unresolved graphic without blocking the application


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.5.2 (x64)
Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 32; OS: Windows 10.0 Build 19041; UI render: default; VCL: win; 
Locale: en-GB (en_GB); UI-Language: en-GB
Calc: CL
Comment 1 Eelco de Vlieger 2020-08-02 16:50:03 UTC
Created attachment 163886 [details]
Sample document with linked localhost graphic on page 5
Comment 2 Xisco Faulí 2020-08-03 16:36:51 UTC
this looks similar to bug 131185.
For me, it hangs for 1-2 seconds.
Regression introduced by 

https://cgit.freedesktop.org/libreoffice/core/commit/?id=9fb7aaf570c03c8a26d763f1205fb8c890e8211a

author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2018-04-13 16:58:49 +0900
committer	Tomaž Vajngerl <quikee@gmail.com>	2018-04-16 02:52:02 +0200
commit 9fb7aaf570c03c8a26d763f1205fb8c890e8211a (patch)
tree 8f4466b24d9fcae2da5043479a57fabc662a2c43
parent ba69036c8e889237da4bb312d7c5c94066abbfd3 (diff)
Make linked graphic register into LinkedManager again

Bisected with bibisect-linux64-6.1

Adding Cc: to Tomaž Vajngerl
Comment 3 Miklos Vajna 2021-09-01 13:07:51 UTC
The above commit just shifts the download+parse of that image from import-time to render-time. If you have a document with lots of images, then this lazy-loading is a great change, you don't need to wait for the parsing of all images till you see the first page.

While it's true that scrolling to the image freezes the UI for 1-2 seconds, the same synchronous loading already happened before the above commit, just at load time.

If you profile just the load time of the document, then the new cost is:

real    0m1,966s

while it used to be:

real    0m4,828s

so this isn't a regression, just this cost was paid import-time in the past and now it's paid render-time.

Let's leave the bug open, since async loading from the network would be indeed nice, but let me adjust keywords accordingly, since this never worked.
Comment 4 QA Administrators 2023-09-02 03:05:51 UTC
Dear Eelco de Vlieger,

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 https://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://web.libera.chat/?settings=#libreoffice-qa

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

Warm Regards,
QA Team

MassPing-UntouchedBug