On 08/04/2012 10:51 PM, Khem Raj wrote:
> On Sat, Aug 4, 2012 at 12:37 PM, Andreas Müller
> <[email protected]> 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
> [email protected]
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
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)
 
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
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to