]> code.ossystems Code Review - openembedded-core.git/commit
initscripts: populate-volatiles: Speed up processing
authorJoshua Watt <jpewhacker@gmail.com>
Fri, 12 Oct 2018 16:24:09 +0000 (11:24 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 13 Oct 2018 15:03:44 +0000 (16:03 +0100)
commitf380fac8a43a75861f3157777b12a317b985a5e1
tree5358059ffe0ebb597115c54a48ee79ccb93319ab
parent3095fbee4b46e9bb2aa9c7355bdb554331df201c
initscripts: populate-volatiles: Speed up processing

Checking the requirements for each volatiles file in the
populate-volatiles script can be very slow when there are a large number
of volatiles files, easily consuming over 80% of the processing time.
These checks don't usually uncover any problems so concatenate all the
volatiles files together and process them as one large file for a "fast
path" option. This ensures that the penalty for checking the
requirements is only incurred once. In the event that checking the
requirements for the unified file fails, fall back to the slow process
of checking each one individually so that the offending one can be
skipped.

The core file is handled separately because it is responsible for
creating the temp directory used by check_requirements and thus must
always run first and without having its requirements checked.

[YOCTO #12949]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh