optimization work

David Zeuthen david at fubar.dk
Sun Oct 8 16:42:03 PDT 2006


On Sun, 2006-10-08 at 14:34 -0400, David Zeuthen wrote:
> Hi,
> 
> Someone asked me to write down the various optimization tasks we have
> ahead of us. I've added that to doc/TODO, see
> 
>  http://gitweb.freedesktop.org/?p=hal.git;a=blob_plain;h=921afabd9e72b23e6e6877dc9bb684d9ed512e80;f=doc/TODO
> 
> Comments / clarification / discussion welcome - just reply to this
> thread.

I played around a bit with sysprof to measure what work we're doing on
startup. Running

        # time ./run-hald.sh --skip-fdi-install --exit-after-probing > /dev/null 2>&1
        real    0m2.065s
        user    0m0.572s
        sys     0m0.624s
        
where --skip-fdi-install is just to tell run-hald.sh not to copy fdi
files for the configured build into a local directory (to e.g. avoid the
fdi files for features the build should not include).

This is on a Macbook Pro 2GHz dual core 1GB RAM. Interestingly enough on
my Thinkpad T41 1.6GHz 512MB RAM it's not much slower, real is around
2.1 or 2.2 seconds, e.g. only 100-200ms slower.

I've put up a file here

 http://people.freedesktop.org/~david/hal-profile/1/hal-profile1

that you can load into sysprof. Here's a screen shot of one of the major
offenders

 http://people.freedesktop.org/~david/hal-profile/1/Screenshot-hal-profile1.png

Note that due to the (extremely) asynchronous nature of how hald works
it's pretty difficult to interpret the output. However, since we know
that scan_fdi_files() block we can trust that it really takes ca. 23% of
the execution time.

     David




More information about the hal mailing list