site  contact  subhomenews

Preloading files

December 09, 2013 — BarryK
I have reported one problem with Quirky6 when booting off a USB2 drive, the slow startup of applications. This is only the first-time startup after bootup though, as subsequent restarts of an application are much faster, due to the files already loaded into RAM.

To achieve fast first-start of SeaMonkey, that being the most outstandingly slow startup app of all, I googled around for a utility to pre-load the SM files.

The first one I found is called 'preload':
http://sourceforge.net/projects/preload/

...unfortunately, I couldn't get it to preload anything.

Then I found 'readahead-list', which is really what I was after, as it just takes a list of files and preloads them. Note though, it does also have a monitor daemon, but I don't need that.

Project page:
http://git.orbis-terrarum.net/?p=infrastructure/readahead-list.git;a=summary
I downloaded from here:
http://mirror.fsf.org/gnewsense/gnewsense-metad/gnewsense/pool/main/r/readahead-list/

This was used in Debian and Ubuntu distros some years ago.

It works great. I have put a little script into /etc/init.d, and the files are loaded in the background. The list of files is in /etc/preloadlist, user-editable.

Especially on the very first startup of Quirky, while the user looks at the QuickSetup and Welcome screens, the SM files will have completed loading in the background, then when the user clicks on the web browser link, there will be a very pleasant quick startup of SM.

Comments

busybox readahead instead?"jamesbond"Why don't just do
while read -r p; do readahead $p; done < /etc/preload-list


readahead is a busybox applet, and it is actively maintained.
I'm using the same code to preload fonts and icons (cause of major slowdowns of starting rox and gtk2).
I wrote about my experiences booting Quirky 6
using a PLOP CD. (My USB port is non-bootable).
http://murga-linux.com/puppy/viewtopic.php?t=90683
Everything went well and I compiled mtpaint and mhwaveedit.

However, later when I formated the unallocated space on my USB stick
using gparted in precise puppy I couldn't boot the USB stick.

The PLOP CD couldn't see the Quirky install.
Well, well, amazing busybox, I didn't know it had that!

don570,
OK, I will test that. My next build of Quirky will have the latest Gparted, which might make a difference.

xargs readahead < /etc/preloadlist

Tags: linux