# Linux Kernel Module Cheat

### 26.8. Buildroot rebuild is slow when the root filesystem is large

Buildroot is not designed for large root filesystem images, and the rebuild becomes very slow when we add a large package to it.

This is due mainly to the `pkg-generic` `GLOBAL_INSTRUMENTATION_HOOKS` sanitation which go over the entire tree doing complex operations…​ I no like, in particular `check_bin_arch` and `check_host_rpath`

We have applied 983fe7910a73923a4331e7d576a1e93841d53812 to out Buildroot fork which removes part of the pain by not running:

    >>>   Sanitizing RPATH in target tree

which contributed to a large part of the slowness.

Test how Buildroot deals with many files with:

    ./build-buildroot \
      --config 'BR2_PACKAGE_LKMC_MANY_FILES=y' \
      -- \
      lkmc_many_files-reconfigure \
      |& \
      ts -i '%.s' \
    ;
    ./build-buildroot |& ts -i '%.s'

and notice how the second build, which does not rebuilt the package at all, still gets stuck in the `RPATH` check forever without our Buildroot patch.