[PATCH] pci.id performance patch

Danny Kukawka danny.kukawka at web.de
Thu Oct 12 07:43:20 PDT 2006


On Wednesday 11 October 2006 06:17, David Zeuthen wrote:
> New commits:
> diff-tree 5e33459557cf9d4680f894392a834b7752acd60a (from
> e6b0bd21ae250d6d589e2584fd624b7bd2fa6835) Author: David Zeuthen
> <davidz at redhat.com>
> Date:   Wed Oct 11 00:17:34 2006 -0400
>
>     use mmap to access pci.ids and usb.ids
>
>     Goodbye 580KB of writable memory! :-)

I would propose to undo the change for pci.ids. We think the change from 
writable memory to readonly memory doesn't bring better performance of HAL. 
If we use writable memory we can optimize the process of search in the file.

I attached a (slightly reworked) patch from Ihno Krumreich against git HEAD, 
which we already use on SUSE since 0.5.6 to speed up the search. IIRC the 
patch should bring us ~50 percent within the search function.

Please review and comment.

Danny

 ids.c |  143 +++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 107 insertions(+), 36 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-performance_pci.ids_v3.diff
Type: text/x-diff
Size: 5334 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20061012/94ba4768/hal-performance_pci.ids_v3.bin


More information about the hal mailing list