Skip to content
Commit 33ebb967 authored by Oleksandr Popovych's avatar Oleksandr Popovych Committed by Anuj Mittal
Browse files

utils: Reduce the number of calls to the "dirname" command



utils.bbclass contains create_cmdline_wrapper() function that
creates wrapper script with additional arguments for any passed
"$cmd" command, and uses several calls to "dirname".

Because "dirname" is an external command, in cases of lots of
calls to wrapped "$cmd", each call of "dirname" will incur
significant overhead.

There are three same calls to "dirname": one for saving it`s
output to "realdir" variable, and other two in "exec" command.
So last two "dirname" calls can be replaced with cached value
from "realdir" variable.

Signed-off-by: default avatarOleksandr Popovych <opopovyc@cisco.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4b9cf2c8)
Signed-off-by: default avatarAnuj Mittal <anuj.mittal@intel.com>
parent 1a9addac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment