[PATCH 0/8] Various large optimisations

Richard Hughes hughsient at gmail.com
Mon Nov 19 10:34:29 PST 2007


On Mon, 2007-11-19 at 11:55 -0500, Doug Klima wrote:
> Rob Taylor wrote:
> > Here is a sequence of patches that optimise HAL's startup time and
> > memory usage.
> >
> > They can be split down into 5 main parts:
> >
> >  1) Use gslice for HalProperty and HotplugEvent. This gives us better
> > memory locality for these commonly used structures

This rocks, but like Doug says, requires a new glib. I'm totally for
this change.

> >  4) Allow hotplug events to process in parallel. This intruduces into
> > HAL a similar parallel event processing method as udev. Along with 2),
> > this removes the coldplug memory peak almost entirely (Cutting down to
> > 350K on my intel hardware and about 150K on an N800)

Be careful with this. I had big problems with this a few months ago with
coldplug ordering issues - I'm sure the list has all the juicy details.

> >  5) Add the ability in HalDeviceStore to index given properties by
> > value. Profiling showed that about 20% of coldplug time was spend in
> >  hal_device_store_match_key_value_string to look up devices by
> > sysfs_path. This generic patch cuts each lookup to a couple of hash
> > table lookups, versus n strcmps.

Can't we just hardcode sysfs path?

Richard.




More information about the hal mailing list