Wednesday, July 13, 2011

Making openoffice/libreoffice save faster.

With large documents, openoffice/libreoffice slows down miserably saving documents; most of the problem is HDD I/O.

That can be solved in most Non-Microsoft systems by saving to ram instead of the HDD.

To start off, make a folder named X... this'll be the place where you'll copy over the document you'll be editing (COPY, NOT CUT).

mount a tmpfs filesystem (portion of RAM) to this folder (as root) -

mount -t tmpfs none 'full path of X enclosed in single quotes'

Then copy over the document to folder X, notice if you turn off the PC, you'll loose the document, thus it's critical to make backups (i'll tell you an automated method).

Notice, when saving changes to the document, it'll be faster... there's a another hack to make things yet faster, but before that let's make the automated backup. Run the following (not as root) in a terminal -

while [[ $i != '78' ]]; do sleep 60; cp 'full path to document in folder X in single quotes' 'full path to original document in single quotes'; done

This'll make backups withing a single minute of the document.
As of further making things faster, first make a dir Y in /tmp -
mkdir /tmp/Y

Then mount a tmpfs file system on it (as root) -

mount -t tmpfs none /tmp/Y

Goto openoffice, in tools > options > openoffice/libreoffice > paths

In here set the temp directory to /tmp/Y.

You're done, saves should be a lot faster now (restart all instances of openoffice). However notice, under VERY large documents and limited amount of ram (usually less than 1 GB with KDE), this may fill up your RAM very quickly.

No comments:

Post a Comment