All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurentiu Palcu <laurentiu.palcu@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 4/5] gtk-icon-cache: call postinst scriplet at do_rootfs time
Date: Sun, 05 Aug 2012 19:58:39 +0300	[thread overview]
Message-ID: <501EA63F.9090304@intel.com> (raw)
In-Reply-To: <CAMKF1spXi6PqV6ZLqLPMUE0oEF2Sou+Jst-QME-XhLoCANeaPQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]



On 08/04/2012 10:51 PM, Khem Raj wrote:
> On Sat, Aug 4, 2012 at 12:37 PM, Andreas Müller
> <schnitzeltony@googlemail.com> wrote:
>> And less than 3min on overo with the patches we sent (and my xfce
>> image is full of gtk-icon-update). Don't misunderstand me: I agree on
>> doing things like this on host if possible. But for me the main time
>> waiting on a new image is do_rootfs and I just suggest to think about
>> having these tasks run only once - but we can do this later or never.
>> A bit off topic: As far as I can remember there were times when it was
>> a no-go having gtk-native in oe-core. I hope they are over...
> 
> I certainly agree with you that it should be run once. However what if
> you changed something in icons between towo do rootfs runs ?
> but I would like to know how much build time is it adding to do_rootfs ?
Short answer: *less than 2 secs*

Long answer:
In order to measure the time added to do_rootfs by the
gtk-update-icon-cache calls, I modified gtk+ recipe to create a wrapper
script, as seen in attachment [1].

I compiled core-image-sato using the following setup:

CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 4 cores with HT
RAM: 8GB
Storage: SSD

The measurements are in attachment [2].

Conclusion: I would say that a delay of less than 2 seconds added to
do_rootfs is not that bad, in my opinion. Of course, we can optimize
this as much as possible but, is it worth the effort?

You could give it a test yourselves and let me know your results. I will
send a version 2 of the patchset(as soon as we all agree on the
solution), with some changes suggested by Mark and some PR bumps
suggested by Koen.

[1] - measure_time.patch
[2] - do_rootfs.log

Thanks,
Laurentiu

> sometimes over optimising is bad too.
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 

[-- Attachment #2: measure_time.patch --]
[-- Type: text/x-patch, Size: 961 bytes --]

diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb
index 878eb87..e77ecce 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb
@@ -41,6 +41,18 @@ BBCLASSEXTEND = "native"
 RRECOMMENDS_${PN}_virtclass-native = ""
 DEPENDS_virtclass-native = "glib-2.0-native atk-native pango-native cairo-native gdk-pixbuf-native"
 
+do_install_append_virtclass-native () {
+    mv ${D}/${bindir}/gtk-update-icon-cache ${D}/${bindir}/gtk-update-icon-cache.real
+
+    cat << "EOF" > ${D}/${bindir}/gtk-update-icon-cache
+#!/bin/bash
+
+echo "Executing: gtk-update-icon-cache $@" >> ${TMPDIR}/do_rootfs.log
+/usr/bin/time --f "real:%e user:%U sys:%S" -o ${TMPDIR}/do_rootfs.log --append gtk-update-icon-cache.real $@
+EOF
+    chmod +x ${D}/${bindir}/gtk-update-icon-cache
+}
+
 python populate_packages_prepend () {
     prologue = d.getVar("postinst_prologue", True)
 

[-- Attachment #3: do_rootfs.log --]
[-- Type: text/x-log, Size: 3556 bytes --]

Executing: gtk-update-icon-cache -q /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs//usr/share/icons/hicolor
real:0.05 user:0.00 sys:0.03
Executing: gtk-update-icon-cache -q /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs//usr/share/icons/hicolor
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -q /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs//usr/share/icons/hicolor
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -q /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs//usr/share/icons/hicolor
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/Sato
real:0.25 user:0.01 sys:0.15
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/hicolor
real:0.05 user:0.01 sys:0.01
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/xcursor-transparent
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/Sato
real:0.25 user:0.04 sys:0.12
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/hicolor
real:0.04 user:0.00 sys:0.02
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/xcursor-transparent
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -q /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/Sato
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/Sato
real:0.25 user:0.03 sys:0.13
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/hicolor
real:0.05 user:0.00 sys:0.03
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/xcursor-transparent
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/Sato
real:0.25 user:0.03 sys:0.13
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/hicolor
real:0.05 user:0.00 sys:0.03
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/xcursor-transparent
real:0.00 user:0.00 sys:0.00
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/Sato
real:0.26 user:0.04 sys:0.13
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/hicolor
real:0.04 user:0.00 sys:0.02
Executing: gtk-update-icon-cache -fqt /ssd/yocto/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato-1.0-r0/rootfs/usr/share/icons/xcursor-transparent
real:0.00 user:0.00 sys:0.00

  parent reply	other threads:[~2012-08-05 17:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 20:19 [PATCH 0/5] Run postinst scriptlets at do_rootfs time Laurentiu Palcu
2012-08-03 20:19 ` [PATCH 1/5] gtk+: enable gtk+-native Laurentiu Palcu
2012-08-03 20:19 ` [PATCH 2/5] sato-icon-theme: make postinst scriplet run at do_rootfs time Laurentiu Palcu
2012-08-06  9:28   ` Burton, Ross
2012-08-03 20:19 ` [PATCH 3/5] package_rpm: export the native directory to the postinst scriptlets Laurentiu Palcu
2012-08-03 20:25   ` Mark Hatle
2012-08-04  7:46     ` Laurentiu Palcu
2012-08-04  8:59       ` Laurentiu Palcu
2012-08-04 14:41         ` Mark Hatle
2012-08-03 20:19 ` [PATCH 4/5] gtk-icon-cache: call postinst scriplet at do_rootfs time Laurentiu Palcu
2012-08-03 23:22   ` Andreas Müller
2012-08-04  7:49     ` Laurentiu Palcu
2012-08-04  9:29       ` Andreas Müller
2012-08-04 14:01         ` Laurentiu Palcu
2012-08-04 17:14           ` Koen Kooi
2012-08-04 19:37             ` Andreas Müller
2012-08-04 19:51               ` Khem Raj
2012-08-04 19:56                 ` Martin Jansa
2012-08-04 20:25                   ` Andreas Müller
2012-08-05 16:58                 ` Laurentiu Palcu [this message]
2012-08-05 22:30                   ` Andreas Müller
2012-08-05 22:49                     ` Andreas Müller
2012-08-06  7:48                       ` Laurentiu Palcu
2012-08-06  8:10                         ` Andreas Müller
2012-08-06  9:18                           ` Laurentiu Palcu
2012-08-06  9:35                             ` Burton, Ross
2012-08-06  9:36                             ` Andreas Müller
2012-08-06 18:50                             ` Andreas Müller
2012-08-05 11:50               ` Koen Kooi
2012-08-04 10:24   ` Koen Kooi
2012-08-03 20:19 ` [PATCH 5/5] gdk-pixbuf: allow postinst scriplet to be called " Laurentiu Palcu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=501EA63F.9090304@intel.com \
    --to=laurentiu.palcu@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.