0

I am already using ureadahead and preload for a long time. It works fine, but I often have to use Microsoft Office 2010, which is installed with PlayOnLinux. The first load of Word, Excel or Powerpoint needs a long time. The second load time of these applications is okay.

So I am wondering if there is the possibility to preload these applications? Can anybody help me how to do this?

I found out that there is also a "wine-preloader", but I couldn't find out how it can help me in this case exactly. It's also a little bit confusing to me if the first longer load time is because of PlayOnLinux' virtual machine or because of Wine's loading of the specific application.

So my explicit questions are:

  1. What exactly and how can I preload anything to speed up the first start of the Office Applications?
  2. Can I keep the preloading, also if there is a longer idle time of not using the office applications? (to avoid that there is i.e. 60 minutes later a behaviour like the "first load" again)
  3. Of course I am thankful for other tipps as well. Please avoid instructing me to use Libre- or OpenOffice. I know :) But this is not the topic here.

Thanks a lot!

Regards, Berzi

0

There is a configuration option for /etc/preload.conf called mapprefix that defaults to this:

# mapprefix:
#
# A list of path prefixes that controll which mapped file are to
# be considered by preload and which not.  The list items are
# separated by semicolons.  Matching will be stopped as soon as
# the first item is matched.  For each item, if item appears at
# the beginning of the path of the file, then a match occurs, and
# the file is accepted.  If on the other hand, the item has a
# exclamation mark as its first character, then the rest of the
# item is considered, and if a match happens, the file is rejected.
# For example a value of !/lib/modules;/ means that every file other
# than those in /lib/modules should be accepted.  In this case, the
# trailing item can be removed, since if no match occurs, the file is
# accepted.  It's advised to make sure /dev is rejected, since
# preload doesn't special-handle device files internally.
#
# Note that /lib matches all of /lib, /lib64, and even /libexec if
# there was one.  If one really meant /lib only, they should use
# /lib/ instead.
#
# default: (empty list, accept all)
mapprefix = /usr/;/lib;/var/cache/;!/

This means that by default files in /usr, /lib and /var/cache are eligible, but other files won't be preloaded. You could modify it to include the path on disk where your program you want cached exists, such as:

mapprefix = /usr/;/lib;/var/cache/;/home/someone/.winexxx/;!/

Where /home/someone/.winexxx is the WINE_PREFIX for the given PlayOnLinux program.

Another option would be to use the gopreload command and run that program manually, something like this:

gopreload WINE_PREFIX=~/.winexxx wine ~/.winexxx/drive_c/foo.exe

Although for that a.) you would need to compile/install gopreload manually and b.) you should need to ensure you're running the correct wine program with the prefix and other settings PlayOnLinux would use. You can likely get those by looking at a shortcut or .desktop file if you can get PlayOnLinux to create one for you.

However, there is another problem which is what preload considers code versus data and how it preloads things. I have a feeling that most of what is being executed by wine will end up being seen as data and not preloaded. You'll want to check the preload log files to see what it's actually doing if you go that route.

A poor man's solution could be to create a boot-script that simply reads these files from disk thus "priming" the cache to contain them, something like:

ionice -c 3 vmtouch '/home/someone/.winexxx/drive_c/Program Files (x86)/Microsoft Office'

This would run ionice so that it happens in the background / idle not to slow down other functionality and then vmtouch to map the data for the program into RAM.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.