Loading each document about 3 minutes

Hi everybody,

I have a problem with my LibreOffice. I have to wait for each document
(tested with ODT and ODS) to open for about 3 minutes.

Using version 4.2.4.2, build ID 63150712c6d317d27ce2db16eb94c2f3d7b699f8,
Windows 8.1 32-bit, 64-bit processor,
Lenovo IdeaPad Flex 10.

Also using the Avast Free Antivirus software (www.avast.com), version
2014.9.0.2018.

I read many threads throughout the web that were pointing to antivirus
software from such a problem.

I tried to add the "<Program Files>\<LibreOffice>\program" directory to the
Avast's exception list (as suggested somewhere for another antivirus) so it
shouldn't check the program for viruses.

But it seems it checks every document separately upon the start of the
reading process and the examination lasts for so long.

How do I avoid such annoying delays, especially when I trust my own
documents? Every idea will be gladly appreciated.

Note: I post here because I am not absolutely sure that this is a problem on
the antivirus side.

​An easy way to check this is to temporarily disable your antivirus live
protection and try to open the files. As long as you don't wander on shoddy
websites or plug unknown usb keys in the process it's pretty safe.

Thank you for your response, Cley.
OK, I disabled Avast completely (just only didn't uninstall it, only
disabled it) and even rebooted "for the change to take effect".
Oops, the problem presists even with the antivirus disabled.

The other cause that was mentioned in the posts I found was a
disconnected printer.
LibreOffice checks the printers to get their properties upon document
load and when a printer is disconnected and it can't contact it, it
waits several minutes if the printer occasionally connects.
I also remember there was written that that software that waits isn't
LibreOffice itself but the Windows printing spooler.
So is there any solution to my problem except having the two computers
which share that two disconnected printers always turned on or switching
them on each time I need to work with LibreOffice on the third computer
(which is a notebook)?
I know, this sounds crazy but this is Microsoft.

I have a chance to reboot to Linux Mint on my notebook so it could be a
workaround for me but I'm trying to get a solution also for the others
who may face such a problem.

So what else may be the actual cause of the delay? Is it the Windows
printing spooler?

​I can't tell for sure if that's the culprit, but if it is, you might be
able to mitigate the issue by installing a virtual printer like a pdf
printer (if you don't have one already) AND setting it as the default
system printer. This might help, as the default printer asked for
properties should always be "present" now.

Of course, if that's not the cause of the issue, I have no idea. Does this
happen with every document, or just a handful/documents in specific
folders? There's two things that comes to mind: either some document got
exceedingly complex from the parser point of view (usually happen when
switching back and forth between different formats), or some other windows
magic is at work. (I don't exclude a possible bug in LO, but since it's a
relatively rare problem, it's more likely due to some strange interaction
than due to LO in itself.)

Hi :slight_smile:
Errr, probably better to install a different anti-virus first before
disabling the current one. AVG is good and free. Of course the new
anti-virus might have the same problems as the old one but it's fairly
unlikely. Cley's way does make certain it's not (or is) the anti-virus.

Does the same thing happen when opening other types of files? For example
video or music. Also have you tried different formats? ie, is it 'just'
DocX or do Doc and Odt also have the same problem? Rtf files were found to
be so problematic recently that MS sent out an update to prevent them being
opened, or something like that. Of course the Rtf problem only affects MS
Office so it shouldn't be a factor.

Regards from
Tom :slight_smile:

Hi Cley and TomD,

thank you for your replies.

I have an interesting update.
I uninstalled Avast completely and rebooted.
I also installed PDF Creator and set it as the default printer.
Printed a document in LO to PDF Creator so that it remembered PDF
Creator as the last used one (and thus the default one).
After that the delay has dropped down to about one minute and it
shrinked its appearance to only ODS files. ODT and XLS files are opening
immediately. Tested with two ODS files with a very long history. I
edited them with OpenOffice.org, LibreOffice, on Linux, Windows, various
machines and versions.
I also discovered that the same one-minute delay appears when displaying
the print dialog when trying to print these ODS spreadsheets. Trying to
display the print dialog from the XLS files (which are basically parts
of the ODS files saved to XLS) gives me no delay at all.
I opened another ODS file now and it loaded immediately.

So I am pretty sure now the problem shrinked only to the two problematic
ODS spreadsheets.

I'll try to reinstall Avast to see what changes. It may be another
problem. One delay on the problematic files makes 1 minute and the
remaining 2 minutes could be caused by the antivirus. I'll keep you
informed.

Interesting news. I reinstalled Avast and the delay remains at 1 minute
for the "bad" ODS files only. Other files, including another ODS, load
immediately.
So maybe the issue doesn't lie in the antivirus at all.

Other news.

Displaying the print dialog delays 1min 20s or 1min 40s when the
disconnected printer is set as default in the system and regardless of
what document is loaded. When PDF Creator is set as the default, the
print dialog displays without delay.

But opening the "bad" ODS files still lasts about 1min 5s. Even with
Avast installed.
It's however better than the initial state of loading each document
about 3 minutes.
Maybe Avast needed to be reinstalled...
So does somebody have an idea what's causing the remaining delay by
loading the ODS spreadsheets?
One of the files contains about 30 sheets, each of them 1-3 pages long.
But it can't be the cause because the other file contains only 1 sheet
with 4 rows.

I have other news.
Setting the disconnected printer to default prolongs the loading delay
to 2min 5s.
Setting PDF Creator to default shortens the loading delay back to 1min 5s.
Both loading the "odd" ODS files.
...
Oh no. I am back on 3 min 10s with an ODS file that didn't have any
delay before.
And an ODT file started to delay 3:10.
Another ODT file loads fine and the XLS files also load fine.
Guys, this is starting to be very random.
Maybe Avast returned to its old habits again.
I'm going to test without it again.

​Knowing that the printer issue is still real (and fixable somehow) is good
news.

Now, as to why some specific files take longer to open, there's too many
causes to rule out, and some of these causes might even be invisible.

Maybe there's a lot of complex formula that gets calculated when loading,
maybe there are macro that run when opening these files, or maybe it's
something else (although I believe there is an option to not compute
formula automatically... this might need to be tested).

It might be impractical for the 30 sheets document, but you can try this:
select all content from the 1-sheet document, and copy/paste it in a new
calc file. Then, check how long this new file take to load...

Thank you for your response, Cley.
OK, I disabled Avast completely (just only didn't uninstall it, only
disabled it) and even rebooted "for the change to take effect".
Oops, the problem presists even with the antivirus disabled.

The other cause that was mentioned in the posts I found was a
disconnected printer.
LibreOffice checks the printers to get their properties upon document
load and when a printer is disconnected and it can't contact it, it
waits several minutes if the printer occasionally connects.
I also remember there was written that that software that waits isn't
LibreOffice itself but the Windows printing spooler.
So is there any solution to my problem except having the two computers
which share that two disconnected printers always turned on or
switching them on each time I need to work with LibreOffice on the
third computer (which is a notebook)?
I know, this sounds crazy but this is Microsoft.

I have a chance to reboot to Linux Mint on my notebook so it could be
a workaround for me but I'm trying to get a solution also for the
others who may face such a problem.

So what else may be the actual cause of the delay? Is it the Windows
printing spooler?

Are you running any spam software. I know on my Linux version of LibreOffice,
when I turn on spamassassin it slows the opening of Documents quite a bit.

Russ

Cigydd wrote:

Other news.

Displaying the print dialog delays 1min 20s or 1min 40s when the
disconnected printer is set as default in the system and regardless of
what document is loaded. When PDF Creator is set as the default, the
print dialog displays without delay.

But opening the "bad" ODS files still lasts about 1min 5s. Even with
Avast installed.
It's however better than the initial state of loading each document
about 3 minutes.
Maybe Avast needed to be reinstalled...
So does somebody have an idea what's causing the remaining delay by
loading the ODS spreadsheets?
One of the files contains about 30 sheets, each of them 1-3 pages long.
But it can't be the cause because the other file contains only 1 sheet
with 4 rows.

I think the last-used printer settings are saved within the file. For new files, or where the printer saved in the file isn't installed, I expect LO would use the default (PDF Creator in your case). If the last-used printer saved in the file is installed, but not currently reachable (from other posts, it looks like you're using networked printers?), there may be a delay while attempting to connect to that printer. I've seen this kind of delay with other software, not just LO, when an installed printer isn't available.

Depending how much you're going to be re-opening the file in between printing, it might be worth making sure it's saved with an always-available printer (e.g. PDF Creator) as the last-used printer:
- Open the file (may have to put up with the delay this once...)
- File > Print
- Select PDFCreator
- Click OK
- Cancel in PDFCreator (unless you want a PDF copy right now)
- Type a character and delete it again (so that the file is modified)
- Save the file
Next time you open the file or go to print it, the printer will be set to PDFCreator so avoids the delay. Of course, if you switch the printer on and print to it, the last-used printer will be set to that, so you might get the delay again next time if the printer is switched off - unless you either close the file without saving or do another dummy print to PDFCreator after printing it.

Mark.

Cigydd wrote:

I have other news.
Setting the disconnected printer to default prolongs the loading delay
to 2min 5s.
Setting PDF Creator to default shortens the loading delay back to 1min 5s.
Both loading the "odd" ODS files.

My guess would be that LO tries to contact the last-used printer as saved in the file. Once that's failed, it tries the system default printer, which is also disconnected. Hence double the delay.

...
Oh no. I am back on 3 min 10s with an ODS file that didn't have any
delay before.
And an ODT file started to delay 3:10.

Did you by any chance (try to) print these file on one of your networked printers, and save them some time after? Perhaps there's a third attempt in there somewhere, giving the 3 minute delay, or maybe something caused each of two attempts to takes about 1:30 rather than 1 minute.

Another ODT file loads fine and the XLS files also load fine.

Probably either:
- The files are saved with a last-used printer which is still available
- The files are saved with a last-used printer which isn't installed at all, and the system default is available
- The files are saved with no printer information, and the system default is available

Mark Bourne wrote:

I think the last-used printer settings are saved within the file. For
new files, or where the printer saved in the file isn't installed, I
expect LO would use the default (PDF Creator in your case). If the
last-used printer saved in the file is installed, but not currently
reachable (from other posts, it looks like you're using networked
printers?), there may be a delay while attempting to connect to that
printer. I've seen this kind of delay with other software, not just LO,
when an installed printer isn't available.

Depending how much you're going to be re-opening the file in between
printing, it might be worth making sure it's saved with an
always-available printer (e.g. PDF Creator) as the last-used printer:
...

Alternatively, I just remembered Steve Edmonds pointed out in another recent thread that there's an option under Tools > Options > Load/Save > General > Load printer settings with the document.

Turning that off (together with setting the default printer to one which is always available, such as PDFCreator) might help you, in a much more convenient way!

Mark.

Thank you for your valuable responses, Cley, upscope and Mark.

I figured out finally that Avast isn't the culprit. Tested without it,
the problem remains, even the 3:10 delays.

I don't run any antispam software, only the antivirus.

So Avast is out of blame for now.

I will concentrate on the printers.

Alternatively, I just remembered Steve Edmonds pointed out in another
recent thread that there's an option under Tools > Options > Load/Save >
General > Load printer settings with the document.

Turning that off (together with setting the default printer to one which
is always available, such as PDFCreator) might help you, in a much more
convenient way!

Mark.

Thumbs up for this one! Turning that setting off cut the delay back to
1min for some files and for others it removed the delay completely.
...
And setting also PDF Creator as the default printer removed the delays
completely for all my files!

Worked like a charm. Thank you guys again for all your help. LibreOffice
is working for me again. It has a living, helping and clever community.
You did it. We did it.
Yippee :wink:

Pavel a. k. a. Cigydd

Hi.
Was a bug ever filed for this.
I have had similar problems so filed a bug https://www.libreoffice.org/bugzilla/show_bug.cgi?id=80697 but it may be related.

I just updated from LO 3.6 to 4.1.6 on OSX 10.68. 3.6 was working fine.
If I go to open a file from LO and navigate to a network share no files show in the share. If I cancel LO hangs and has to be killed.
I can see the files in OSX finder (file explorer).
I can open a file from finder (open with LO).

Once I have at least one file opened from the network share (via finder) I can then see files on the share from within LO file open dialogue.

Save as works ok

Just found if I disable load printer settings with file all is ok.
Steve

Steve Edmonds wrote:

Alternatively, I just remembered Steve Edmonds pointed out in another
recent thread that there's an option under Tools > Options > Load/Save >
General > Load printer settings with the document.

Turning that off (together with setting the default printer to one which
is always available, such as PDFCreator) might help you, in a much more
convenient way!

Mark.

Thumbs up for this one! Turning that setting off cut the delay back to
1min for some files and for others it removed the delay completely.
...
And setting also PDF Creator as the default printer removed the delays
completely for all my files!

Worked like a charm. Thank you guys again for all your help. LibreOffice
is working for me again. It has a living, helping and clever community.
You did it. We did it.
Yippee :wink:

Pavel a. k. a. Cigydd

Hi.
Was a bug ever filed for this.

I'm not sure that it is a bug. LO is trying to contact the printer specified by the user. The printer is not responding, so it takes some time before giving up. Changing the settings so that LO doesn't try contacting that printer fixes the problem.

I have had similar problems so filed a bug
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=80697 but it may be
related.

That looks like it's to do with files not showing up on shared folders - nothing to do with printers?

I just updated from LO 3.6 to 4.1.6 on OSX 10.68. 3.6 was working fine.
If I go to open a file from LO and navigate to a network share no files
show in the share. If I cancel LO hangs and has to be killed.
I can see the files in OSX finder (file explorer).
I can open a file from finder (open with LO).

Once I have at least one file opened from the network share (via finder)
I can then see files on the share from within LO file open dialogue.

I don't know much about OSX, but it seems like the network drive isn't being mounted when opening from LO, but it works if already mounted (e.g. by browsing to the folder from the OS's file browser).

Does Tools > Options > LibreOffice > General > Open/Save dialogue boxes > de-select "Use LibreOffice dialogue boxes" help at all? (If that option is available on OSX). If it does, that would be worth mentioning on the bug report.