Page 1 of 2

[Issue] AOO 4.1 Writer is much slower

Posted: Tue Jun 03, 2014 5:24 pm
by acknak
Anyone else notice a big performance hit with AOO 4.1?

I've been working with an e-book of ~1400 A5 pages, simple text. Writer in AOO 3.4.1 & 4.0.1 takes ~15s to open it; 4.1 takes just over 1 minute--4x longer.

Exporting to pdf seems very slow as well but I haven't actually timed it.
 Edit: Summary: 
Opening large/complex files is much slower in AOO 4.1. The problem seems (in some cases) to be due to bookmarks in the document: removing them improves the load time. But this is not the case for all documents, so the cause is not entirely clear.

I opened an issue for this:
Issue 125055: Opening some documents is much slower in AOO 4.1
You can register there and add your vote (up to two) or comment.
 Edit: PS: 
Tested AOO 4.1.1 m2: performance with my document is much better, faster even than AOO 4.0.1 now ~10s where it was ~60s with 4.1. So it looks like this problem is fixed. Check the bugzilla link for details.

Re: AOO 4.1 Writer is much slower

Posted: Tue Jun 03, 2014 6:31 pm
by RoryOF
Is there any system file indexing function running as the files are closed? I remember that Windows had very slow open/close of OpenOffice some time ago, caused by system file indexing; the cure was to exclude OO files from the indexing function.

I've just checked - my current file (101000 words, 366 A5 pages, book format text) takes 3-4 secs to close 5 secs to open, across the network.

Re: AOO 4.1 Writer is much slower

Posted: Tue Jun 03, 2014 6:57 pm
by acknak
RoryOF wrote:Is there any system file indexing function running as the files are closed? ...
Not that I know of, but it's possible.

Doesn't seem likely that it would affect 4.1 but not 4.0 or 3.4.1.

Re: AOO 4.1 Writer is much slower

Posted: Tue Jun 03, 2014 7:50 pm
by RoryOF
I've just tried 1450 A5 pages 400,000 words to local drive - 7 secs to save. Drive is ext4 format.

Re: AOO 4.1 Writer is much slower

Posted: Tue Jun 03, 2014 11:37 pm
by Hagar Delest
I've not really seen any problem (under Windows Seven).

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 12:37 am
by acknak
Not sure what to do at this point. I don't generally worry about performance but I'm concerned that it's suddenly much worse.
RoryOF wrote:I've just tried 1450 A5 pages 400,000 words to local drive - 7 secs to save. Drive is ext4 format.
Save is less of a problem--I've only checked File > Open.

Thanks for checking!

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 1:06 am
by RoryOF
I'll check opening tomorrow. The file is on a different computer.

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 8:42 am
by RoryOF
Ok. First start of the day for OO, double clicked on the file, 21 sec. Subsequent start from the splash screen preselection 12 secs.

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 8:45 am
by John_Ha
There are essentially four reasons for something being slow:

1 CPU bound
Here, the program is consuming all the CPU and cannot run any faster. If the CPU was faster, the program would run faster. If the disk or memory was faster it wouldn't make any difference.

2 I/O bound
Here the program is waiting for data to come off disk, and the CPU is stalled waiting for more data to process. A faster CPU does no good - you need a faster disk (and it may be latency causing the problem if the file is fragmented; or more likely disk I/O bandwidth - the data just cannot get onto or off the disk fast enough). Disk write speeds are usually slower than disk read speeds. SSD disk latency (especially) and bandwidth are much higher than conventional disks.

3 Memory bound - not enough memory
If the machine does not have enough memory, then unused data in memory needs to be written to the paging space to free up memory. Or, if the data you are processing has been moved to paging space, you need to wait for it to be brought back into memory. The CPU stalls waiting for data.

4 Memory bound - not enough memory bandwidth
Similar to I/O bound except all the data the program needs is in memory, but the CPU is stalled waiting for it to arrive at the CPU. Memory bandwidth is much bigger than disk bandwidth, but CPU intensive operations will stall waiting for data. Memory bandwidth is very expensive. If your PC has two memory slots you usually get more bandwidth if both slots are occupied, rather than having twice the memory is just one slot.

In all cases, another program may be consuming the resource for which your program is waiting.

Performance management and tuning is a methodical checking of each of these four items to find which is causing the problem. AOO is unlikely to be CPU bound unless it is running in a loop, and much more likely to be I/O or memory bound. As it works OK normally, interference from another program is the most likely cause.

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 9:32 am
by RoryOF
My machine is a dual core AMD producing 5525 bogomips per core - not an extraordinarily powerful machine. 4GB memory with a 120GB drive on an ATA interface.
 Edit: it is running Sylpheed (email) in the background and sometimes Firefox, if I'm monitoring the Forum or checking a reference. 
On a linux machine to find the bogomips figure, type

Code: Select all

cat /proc/cpuinfo | grep bogomips
into a terminal

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 1:12 pm
by acknak
Sorry, the point here is not the absolute performance, it's the performance of the latest release compared to the previous release. It appears that something changed in the latest release that drastically slows at least some operations. If the problem is repeatable and not something limited to my situation, then I'll report it.

Here's a link to the file I've been working with: [download link removed]

Times to open the file (File > Open ... first page on screen):
AOO 4.0.1 13s
AOO 4.1 63s

If anyone can grab that file and repeat the same test with 4.0.1 and 4.1 and report the times here, that would be helpful.

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 1:41 pm
by John_Ha
acknak
I get "Forbidden You don't have permission to access /~jes/temp/The Count of Monte Cristo - Dumas (Buss)_20140603a.odt on this server."

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 1:43 pm
by RoryOF
As John_Ha says, no permission!

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 4:07 pm
by acknak
Oops :oops:

Should be working now ...

Re: AOO 4.1 Writer is much slower

Posted: Wed Jun 04, 2014 4:21 pm
by RoryOF
50 seconds from a cold start on 4.1; will try on 4.0.1 later

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 12:22 pm
by John_Ha
acknak
30 seconds for File > Open to first page with 4.1.0 W7, 2 x 2.6GHz, 4GB (1.6GB in use), 1 x 3MB/sec disk.

It is very slow to page through - I rotate the scroll wheel and there is a perceptible lag before the text starts to move and it stalls then jumps. soffice.bin continues to consume about 30% of CPU cycles even when AOO is minimised so there is something very strange happening! I'll investigate later ...

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 12:28 pm
by RoryOF
My first thoughts last night were that the hyperlinks might be causing the problem. I'm away from my usual connection, logged in through a remote site on a laptop, so I can't follow that up for some time.

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 12:34 pm
by John_Ha
acknak
Insert > File and putting it into a new document fixes the slow scroll and high cpu problem but it still takes 30 secs to open. It now has different page formats (some small, some big) and it has lost the page numbering.

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 3:44 pm
by acknak
RoryOF wrote:My first thoughts last night were that the hyperlinks might be causing the problem. ...
Good point! I was also thinking along those lines but I hadn't tested it carefully.

I extracted the text from the document into a plain text file.

File > Open for the plain text was ~ 5s for both 4 and 4.1 That's so much faster I think it must be doing something special.

I also tried File > New > Text Document, then Insert > File (the plain text):
4  32s
4.1 29s

Since those are about the same, it looks like you're right: something in the formatted text is causing the problem.

I can strip out all the hyperlinks and try the comparison again--I'll let you know how that goes. The file also has a LOT of bookmarks; I can check those as well.

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 4:13 pm
by acknak
Ok, here's what I get:

File > Open (links removed):
4  13s
4.1 64s

So no change after removing the hyperlinks.

File > Open (bookmarks [1,903 altogether] removed):
4  9s
4.1 9s

Yow!

So bookmarks are the problem here, clearly.

I'll get a bug report together.

Thanks for helping me look into this!

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 5:18 pm
by RoryOF
Having removed the Bookmarks by highlighting them all in the bookmark manager and letting it delete them, the file now opens in 5 secs on 4.1 for me.
 Edit: File removed at acknak's request 

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 5:27 pm
by RoryOF
Inserting an OO hyperlinked ToC to Headings 1 and 2 does not seem to affect the opening speed. I'm replacing my earlier file with this later one.

Re: AOO 4.1 Writer is much slower

Posted: Thu Jun 05, 2014 6:31 pm
by acknak
Please note: the file I posted here for testing is covered by copyright. I've taken my copy down & asked RoryOF to do the same.

I shouldn't have posted it here--I believe the forum policy forbids attaching copyrighted material.

I've made a new version from the Project Gutenberg text, if anyone's interested.

Re: AOO 4.1 Writer is much slower

Posted: Fri Jun 06, 2014 10:59 am
by John_Ha
acknak wrote:I shouldn't have posted it here--I believe the forum policy forbids attaching copyrighted material.
I have deleted all copies on my PC.

Re: AOO 4.1 Writer is much slower

Posted: Fri Jun 06, 2014 2:52 pm
by acknak
Great, thanks.

At RoryOF's suggestion, I added a summary after the first post above: viewtopic.php?p=313634#p313634
and there's a link to the issue opened for this problem.

In case someone else wants to test this, in the issue description there's a link to a better test file, which doesn't have the same restrictions.

Re: [Issue] AOO 4.1 Writer is much slower

Posted: Tue Aug 23, 2016 7:33 am
by ThankYouKindly
After years of researching and trying many fixes regarding slow file open & file save in OpenOffice, this was the solve!
I am adding to the topic because there is a detail I have found that I do not see mentioned.
I can confirm that after I delete all the accumulated bookmarks that file save & file open is much faster.

My problem is: How did all the bookmarks get there? Hundreds of bookmarks if not thousands!
I do not use bookmarks and did not put them there!
The bulk of my documents are large and most often contain pasted content from web pages, so I am guessing that is the cause of all the bookmarks!??

How do I submit this info to be investigated?

Also, how do I batch delete bookmarks in a document?
Currently I just open Navigator, put the cursor over the first bookmark, then hold the DEL for a few minutes (yes a long time when many bookmarks).

I do have a few hundred of this type of file (large & pasted content), and would like a batch deletion option for bookmarks.

BTW, Now that I am paying attention, I see some bookmarks have snuck back into a few documents that I have not done any pasting to since deleting the bookmarks???

Thank you,

Re: [Issue] AOO 4.1 Writer is much slower

Posted: Tue Aug 23, 2016 10:43 am
by RoryOF
Are these Bookmarks, as one might insert for quick movement about a document, or Hyperlinks, where one links from the document to view content on a remote site?

If you are pasting from the internet, it is often good to use /Edit /Paste special and choose "unformatted text" from the popup.

Re: [Issue] AOO 4.1 Writer is much slower

Posted: Tue Aug 23, 2016 6:27 pm
by ThankYouKindly
These are Bookmarks are listed in the little 'Navigator' window under 'Bookmarks' (with the pushpin icon).

And (thank you) I can confirm that they are being created via standard pasting (hidden from me until now)!

I just tried my usual paste method (but this time had the Navigation window open and displaying the Bookmarks list which I had just emptied).
I selected text (as usual) from my usual web page source, did standard paste in OpenOffice Writer and BINGO, the Navigator instantly added FOUR Bookmarks!
I did the same with 'Paste Special/Unformatted text' and NO Bookmarks!

Too bad all these years this was happening without hint or clue?!

I see that I can use CTRL+SHIFT+ALT+V to paste as "Unformatted text", so that helps. yeay!

Now only one little nag to hopefully eliminate:
1. any way to batch select all Bookmarks and delete?
I have check and have not found such.
It would be nice if Navigator/Bookmarks had right click drop down option to "delete all Bookmarks".

plus i will need to add some keywords to this topic to help others find it when they are looking for a solve to:
OpenOffice Writer Saves taking a very long time.
Solves Auto Save LONG DELAY

BTW, anyone know how to make opened documents 100% independent from each other?
Need to be able to keep working in one Writer document while another is saving (or auto saving),
for years and versions this has been happening,
I am unable to work (i.e. freeze) in a document until a save is finished on a separate document.
Especially annoying when currently active document freezes while auto save runs in other documents (e.g. minimized and not easily seeing progress indicator for auto save).

Thank you!!!

Re: [Issue] AOO 4.1 Writer is much slower

Posted: Tue Aug 23, 2016 6:40 pm
by acknak
ThankYouKindly wrote:... My problem is: How did all the bookmarks get there?
...
The bulk of my documents are large and most often contain pasted content from web pages, ...
Content from the web often contains hyperlink targets that are imported into OO Writer as bookmarks. Some material, like e-books, may contain several targets for every page; for large documents that can lead to hundreds of bookmarks. One ebook I have contains over 6000 bookmarks.

I generally avoid pasting content from the web into my text documents. It takes less time to re-format than it does to clean up the extra stuff like this that I don't want. Instead, I usually paste as unformatted text (Edit > Paste Special > As unformatted text). Sometimes, if the unformatted text discards too much information, I first paste into a new, empty text document and work with it there to clean up the content and remove things like bookmarks that I don't want. It's usually easier to work with a separate temporary document, then paste into the final document.
 Edit: PS: 
If you have a scenario where OO Writer is inserting bookmarks on its own, please describe the details; I don't think that should happen and I've not encountered it. The first question I have if this is happening is: what document format are you working in? I might imagine that OO Writer could add bookmarks if you're saving in some format other than ODF (.odt for text) where bookmarks provide some workaround for a mismatch in the file formats.

Re: [Issue] AOO 4.1 Writer is much slower

Posted: Tue Aug 23, 2016 6:41 pm
by RoryOF
Go to /Insert /Bookmark. Click on the top bookmark, then press Ctrl key. Now click on the bottom bookmark (holding the Ctrl key) and all should be selected. Now press the Delete button and all should vanish.