]> code.ossystems Code Review - openembedded-core.git/commit
udev-cache: replace readfiles() with cmp
authorRichard Tollerton <rich.tollerton@ni.com>
Mon, 8 Dec 2014 23:13:35 +0000 (17:13 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Dec 2014 17:54:14 +0000 (17:54 +0000)
commite8ea6a29ed3ab9892a3bc7ee8249f10688c0af29
treec890649b03de4f96116dc1bfe1a0ca806ba88d11
parent107e7fa2b2cc2e06addb83518c03b3ab769fed6f
udev-cache: replace readfiles() with cmp

Currently, udev-cache system configurations are compared as shell string
variables, read into memory with the readfiles() function. This is more
complex, and significantly (27-41%) slower, than comparing them using
`cmp`. (Performance was verified on both Cortex-A9 and Intel Nehalem
systems.)

So just use cmp. This requires a few other small changes:

exclude /proc/atags from CMP_FILE_LIST if it doesn't exist to avoid
errors in `cat` and `cmp`.

`cmp -q` doesn't exist in busybox, so instead, redirect output to
/dev/null.

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
meta/recipes-core/udev/udev/init
meta/recipes-core/udev/udev/udev-cache