Bug 68626 - Slow startup when loading a document, instantaneous when starting without a document
Summary: Slow startup when loading a document, instantaneous when starting without a d...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: File-Opening
  Show dependency treegraph
 
Reported: 2013-08-27 20:21 UTC by Jeff Fortin Tam
Modified: 2020-09-22 13:58 UTC (History)
2 users (show)

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


Attachments
screencast (821.26 KB, video/webm)
2013-08-27 20:21 UTC, Jeff Fortin Tam
Details
sample file used in the screencast (17.96 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-08-27 20:21 UTC, Jeff Fortin Tam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin Tam 2013-08-27 20:21:26 UTC
Created attachment 84749 [details]
screencast

The attached video demonstrates LibreOffice 4.1.0.4 being sluggish at starting when it has to open a document. In my case, it was regardless of which document was actually being opened, as an empty spreadsheet or text file causes this issue just as well.

I have observed this to be somewhat random; it happened to me more often than not, but not always. It makes me think it might be a race/timer condition of some sort. 

A few hours after recording this video, I couldn't experience the issue anymore, and this coïncided pretty well with the fact that my network connection had stopped lagging - while I was having issues with libreoffice, it just so happens that I had packet loss and slow ping/long latency on my network.

This makes me suspect that this may have something to do with GVFS in GNOME - if you have SSH/SFTP folders mounted in Nautilus and your network is slow to respond, for example.

If there is any code in libreoffice that touches/relies on gio/gvfs, we should ensure it cannot block startup/doesn't slow down loading a local file...

For what it's worth, my machine has a fast solid state drive (Intel SSDSA2BW160G3L) with 8 GB of RAM and a Core i7 CPU on GNOME 3.8 with Fedora Linux 19 64-bit.
Comment 1 Jeff Fortin Tam 2013-08-27 20:21:49 UTC
Created attachment 84750 [details]
sample file used in the screencast
Comment 2 retired 2013-08-28 00:32:28 UTC
I cannot reproduce this problem on Ubuntu 13.04 and LO 4.1.0.4 with hte example document. In a Virtual machine and an SSD this opens in about 2 seconds.

Don't have enough background. Maybe notourbug since from what you write the cause of the problem could indeed be the network issues affecting your overall system performance.
Comment 3 Jean-Baptiste Faure 2013-11-14 21:24:32 UTC
Hi Jean-François,

Did you try to build LibreOffice yourself? That will make you able to play with various hypothesis about gvfs/gio ?

Best regards. JBF
Comment 4 Jeff Fortin Tam 2013-11-14 22:42:43 UTC
Unfortunately no, building libreoffice is beyond my skillset and available time. Just pointing out problems and a potential cause, as it reminds me a lot of https://bugzilla.redhat.com/show_bug.cgi?id=712945#c10 where I was able to empirically trigger the issue using a firewall.
Comment 5 Jean-Baptiste Faure 2013-12-14 12:27:31 UTC
Hi Jean-François,
do you have a network printer connected to your computer?
If it the case you could try to launch LibreOffice in a terminal after the following instruction: 
export SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION="true"

Best regards. JBF
Comment 6 Jeff Fortin Tam 2014-01-03 21:44:48 UTC
Nope, I didn't have a network printer (or any printer, actually) set up with that computer...
Comment 7 tommy27 2014-06-07 03:57:37 UTC
@Jean-François Fortin Tam
hi, did you retest after upgrading to current 4.2.4.2 release?
set status to NEEDINFO
Comment 8 QA Administrators 2015-01-10 18:06:57 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2015-02-11 19:56:13 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2015-02-11 20:02:39 UTC Comment hidden (obsolete)
Comment 11 alberto 2015-09-19 04:12:39 UTC
Hi,
I can reproduce the problem:

Ubuntu LTS 14.04 amd64

if you open a file through network for every operation in the UI (put a number in a cell o simply select a cell)  you have to wait the network roudtrip delay.

Is not simple to reproduce because you need a slow connection or a really far server. In this moment I have a 3G mobile connection

I can reproduce the problem with gvfs share, with sshfs and samba share

In every case I need to wait the network roundtrip so:

gvfscase
time ls -l /run/user/1000/gvfs/sftp\:host\=myserver.com//home/alberto/documenti/test
totale 10
-rw-r--r-- 1 alberto alberto 9576 set 19  2015 nuovofoglio.ods

real	0m14.589s
user	0m0.000s
sys	0m0.005s

14s are more or less the same time to accomplish an operation on the calc's interface

sshfscase
sshfs myname@myserver.com:/home/alberto/documenti remoto

time ls -l remote/test

totale 12
-rw-r--r-- 1 alberto 1002 9576 set 19  2015 nuovofoglio.ods


real	0m0.964s
user	0m0.001s
sys	0m0.005s


and I need a second for do something

same situation in a smbfs share


Finally I suspect LO do a stat of remote lock file (.~lock.nuovofoglio.ods# in my case)

at every user interaction. 

The problem is more evident in the gvfs case for it poor performances
Comment 12 tommy27 2015-09-19 05:36:19 UTC
thanks for confirming the bug (so status is NEW)
however please do not change version field that way...
it has to indicate the earlies version a bug was seen, not the latest.
so I'm reverting it to 4.1.0
Comment 13 Jean-Baptiste Faure 2015-09-19 07:40:06 UTC
Not sure if it is a bug in LibreOffice or a network configuration problem.
Do you have a reason to say that the problem is on LibreOffice side? If the network or the file system infrastructure is slow, what can do LibreOffice?

Best regards. JBF
Comment 14 alberto 2015-09-19 16:33:41 UTC
I really sorry for the version field. 

For my point of view this is not a network problem. Usually i connect from Italy (Rome) to some servers in north of France. The round trip is about 126ms so if I write a long word (like "piacevolmente") I have to wait  1.6 seconds to see the result on the screen. This is not confortable and I have to copy the doocument in local file system before start editing.
The problem is really annoying if you try to scroll a 10 pages document or more.

I can confirm some network activity during document editing

Thanks
Comment 15 QA Administrators 2016-09-20 10:32:30 UTC Comment hidden (obsolete)
Comment 16 Timur 2020-09-22 13:58:10 UTC
So old. I find no issue and I see this without interest to retest, so I close. 


4.1 with a question to recalculate 
real	1m25,740s
user	0m3,302s
sys	0m0,661s

4.1 2nd time
real	0m7,282s
user	0m2,201s
sys	0m0,423s

7.1+
real	0m26,498s
user	0m3,765s
sys	0m0,382s

7.1+ 2nd time
real	0m4,661s
user	0m2,622s
sys	0m0,321s