]> code.ossystems Code Review - openembedded-core.git/commit
image-buildinfo.bbclass: fix performance problems
authorPatrick Ohly <patrick.ohly@intel.com>
Fri, 11 Mar 2016 15:10:53 +0000 (16:10 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Mar 2016 22:11:20 +0000 (22:11 +0000)
commite59547e4154b772a36f4e58f1d454c0c38653c84
tree18a61304b6eac554a3743a49db49e1d0ca4e8bb7
parent7256e5a9dba0652fe8361f3143771cb6371568b5
image-buildinfo.bbclass: fix performance problems

Inheriting image-buildinfo.bbclass primarily slowed down image
building for two reasons:
1. The content of the shell command "buildinfo" gets expanded
   multiple times, each time again checking the state of all
   layers.
2. When expanded as part of the actual image creation, git
   is invoked under pseudo, which makes the check quite a bit
   slower (from a few seconds to a minute with many layers).

To fix this, buildinfo now is a Python method which calls the checks
only when really executed. Pseudo is told to unload itself when
starting git.

In addition, "git diff" is invoked with "--quiet", which avoids
producing output that is just getting thrown away. As before, any kind
of problem or output causes the layer to be marked as "modified".

[Revision 2 of the change with some dead code removed]

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image-buildinfo.bbclass