LibreOffice Freeze and Slowdown - "Memory" and "Undo" Settings

Our Standard Cautionary Tale on Forums

There is a lot of useless junk in forums that purport to tell you how to fix the memory issues in LibreOffice. Most of them are useless because many of the fixes are based on old, outdated versions of LO, say, for instance, version 5.0 or lower. They are also useless because there is always a lot of speculation and guessing taking up space in a forum. 

The fixes below cut through the useless junk, and they simply work. We assume that you are on an updated version of LO, such as 6.5 or higher, thus many of the improvements to memory settings are already baked into LO. 

Skip the Details

For those who don't need all the "what's" and "why's," skip to the highlighted fixes for items 5 and 6 below.

Background

In earlier versions (see above) of LibreOffice (nee, OpenOffice), memory settings caused the program to react slowly or not at all, depending on the task you were executing. Most of those freezes and crashes had to do with one or more of the following:

  1. General memory cache.
  2. Per-object memory cache.
  3. Object Release Time.
  4. Quickstarter Option Settings.
  5. Use of Java Runtime.
  6. "Undo" settings.
See how we crossed out items 1 through 4? That's because changes to the settings for these items in recent editions of LibreOffice are built-in to the product, but many forums contain outdated information that would have you unnecessarily tinkering with the crossed-out items. Further changes to these settings would likely do more harm than good, so that leaves us with items 5 and 6.

Java Runtime

Most older advice regarding Java Runtime is to turn it off if you aren't using the database functions of LibreOffice. That advice remains true; however, in versions 7.0 and higher (and perhaps in some lower versions) of LO, it is possible that you will see a recurring dialog box each time you launch LO that tells you that some functions will not work properly if you don't activate Java Runtime. From experience, it appears that most of those functions that won't work are associated with the Drawing component of LO. What those limitations might be I have yet to discover; when I turn off Java Runtime and use Drawing, there does not appear to be anything I cannot do, except possibly add or edit connection points to objects. Still testing that one. My beef with the continual warning dialog when launching LO without Java Runtime being activated is that The Document Foundation and forum contributors continue to intimate that you should disable Java Runtime in order to gain memory improvements, while at the same time TDF has built in a dialogue window to continually warn you that "some aspects" of LO will not work properly unless you use Java Runtime. This leads to unnecessary angst.

The Simple Java Fix

For my uses (which consist primarily of Writer files, with fairly frequent use of Drawing, and lighter uses of Calc and Presentation, and only rare tinkering with Database), I simply keep Java Runtime turned off. If I do need it (which is rarely), I simply go to Tools, Options, and re-check "Use a Java Runtime environment." That is a quick and easy thing to do, and like I said, I don't switch between functions all that much and I rarely bump into anything outside of the Database function that will not work with Java Runtime disabled. NOTE: When enabling / disabling Java Runtime you need to relaunch LO for the change to take effect, but that's not a problem for me because (a) I rarely need Java for LO, (b) my default setting is "disabled," and (c) it's a fairly quick thing to do. 

The "Undo" Function Fix

For fun (and occasionally for profit), I convert a ton of public domain documents from their epub, pdf and djvu versions to a LibreOffice Writer version. No need for the details of "why" and "how," only to say that some of the Writer files can get very large, and many of them require multiple Search and Replace tasks that result in literally hundreds or thousands of changes with each S & R. And since each instance of "Replace" requires a certain amount of memory associated with Undo, you can see how replacing a word or phrase 10,000 times in a document would eat up a lot of memory and cause Writer to be very slow or even freeze and require a restart and recovery. For that reason, I have changed the default settings for Undo from 100 to 20.  Before I made this change, I crashed the program frequently by doing S&R's that far exceeded 100 in number, then trying to use the Undo function if I made a mistake or changed my mind. (And even if I did not want to Undo, simply doing that many replacements froze or crashed Writer.) NOTE: Even if you don't do massive Search and Replace, memory is diminished at the higher setting of 100 Undo's.

To change the default setting for Undo, go to Tools, Options, Advanced, and click on the Open Expert Configuration button. In the dialog box that pops up, type in "Undo" (without quote marks) in the Search box, then click the Search button. Scroll down through the results until you see the Undo line as illustrated in the screenshot below. Click on the "Undo" line, then click on the Edit button at the bottom of the dialog box, change the setting (to 20, for example), then click Okay. The next time you launch LO, the new settings will take effect.
Two simple changes. That's all there is to it. Despite its funky memory issues, most of which went away when I applied the two changes above, I still find LibreOffice to be an office suite that is far superior to Microsoft Office in form and function. If not, I would not continue to share my brilliant hacks with you. 😉 Much love and appreciation to TDF.



Comments

  1. This tip worked great. Thank you very much.

    ReplyDelete
  2. Thank you. This was happening to one of my files. I think this may have solved my problem. I do need a large undo memory, but I had it set to 5000. Heh. I changed it to 1000 and also did the Java Run Time unchecking thingy. Thanks so much for your posts here...they're super nifty.

    ReplyDelete
  3. Thanks for these tips. I also found a great improvement in start up times by clearing the Recent Documents list. I think this is because some of those documents were on VPN mapped network drives, that I was disconnected from. I hope LibreOffice finds a permanent fix for the issue of mapped network drives, but in the meantime this is a reasonable workaround.

    ReplyDelete
    Replies
    1. Good idea on clearing the Recent Documents list. Thanks.

      Delete

Post a Comment

Only comments that improve or disprove the contents of the posts on this blog will be approved. Opinions and speculations generally will not be approved. "Self-serving" links will not be approved. Product and advertising links will not be approved, but plain text recommendations might be approved. No form of vulgarity or cursing will be approved. No personal disparaging remarks will be approved. All comments become the property of this blog immediately upon the member's/reader's posting of the comment. All comments may be rejected or edited without recourse to or by the commenter. By posting, you agree to hold harmless this blog, its owner, editors, administrators and contributors, even if your post is approved as-is.

Popular posts from this blog

Creating an Epub file with a clickable TOC using Libreoffice and Google Docs

Compose Key versus Special Character Function in LO Writer