]> code.ossystems Code Review - openembedded-core.git/commit
classes/image: Use xargs to set file timestamps
authorJoshua Watt <JPEWhacker@gmail.com>
Wed, 5 May 2021 21:40:06 +0000 (16:40 -0500)
committerSteve Sakoman <steve@sakoman.com>
Fri, 7 May 2021 15:21:23 +0000 (05:21 -1000)
commit2538a566f01f79537f8a94d93ac02588d6c239ec
tree72b6252aea44f1df1065637283335360f8b40424
parenta150f6fba94518509ee80869ffbfb973c1283e3b
classes/image: Use xargs to set file timestamps

Instead of having find directly invoke touch for each file in the root
file system, pass a list to xargs for batching. This significantly
reduces the number of times the touch program is invoked and speeds up
the do_image task time:

    PKG           TASK      ABSDIFF  RELDIFF  CPUTIME1 -> CPUTIME2
    my-image      do_image   -45.3s   -94.2%     48.1s -> 2.8s

    Cumulative cputime:
      -44.3s    -92.3%    00:48.1 (48.1s) -> 00:03.7 (3.7s)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 15c65f90a3aa1e98c2beab2539403157df1fca08)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/image.bbclass