/preload

preload is an adaptive readahead daemon that prefetches files mapped by applications from the disk to reduce application startup time.

Primary LanguageCGNU General Public License v2.0GPL-2.0

ℹ️ Check out https://github.com/arunanshub/preload-rs for preload implemented in Rust

preload

This preload is a clone of Behdad Esfahbod's preload. The only difference is that this project uses meson as its build system.

Note that this is a work in progress. So, if you're going to use it, make sure that you check meson.build first.

Configuration file for preload is generated from buildfile (meson.build) itself.

Releases

Build Status

You can get releases for Fedora from my Copr.

Building

It is highly recommended that you use prefix as /usr.

The proper way to build is:

meson build --prefix=/usr
# ...
ninja -C build

Even if you don't use --prefix, it is /usr by default.

Manpage Generation

Optionally, you'd require help2man for dynamic manpage generation, which is handled directly by Meson.

Testing

Since preload is an executable, the tests are defined in a bash script runtests.sh, and are run via meson.

You can use

ninja -C build test

or

meson test -C build

to run the tests.

Style Guide

Chromium Style Guide is used with some minor modifications:

  • Maximum column length: 79
  • Indent width: 4

Use this to generate a .clang-format file:

clang-format \
    -style="{BasedOnStyle: Chromium, ColumnLimit: 79, IndentWidth: 4}" \
    --dump-config > .clang-format

Check Mesonbuild's guide on clang-format for more info.