Bug 21741 - startup / parsing is 50% too slow at least ...
Summary: startup / parsing is 50% too slow at least ...
Alias: None
Product: hal
Classification: Unclassified
Component: hald (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Danny Kukawka
QA Contact:
Depends on:
Reported: 2009-05-14 16:56 UTC by Michael Meeks
Modified: 2009-07-18 04:18 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:

patch (6.41 KB, patch)
2009-05-14 17:03 UTC, Michael Meeks
Details | Splinter Review
callgrind profiles before and after (499.85 KB, application/x-compressed-tar)
2009-05-14 17:06 UTC, Michael Meeks

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2009-05-14 16:56:38 UTC
The attached patch substantially accelerates hald startup, by simplifying a very slow code-path. We were spending 50% of the time (previously) calling strncpy 400k times or so ;-)
The patch swaps this for a simple pointer assignment in the common case - and also mostly avoids the 13% of the time we were spending in g_strsplit / g_strnfree un-necessarily.
Comment 1 Michael Meeks 2009-05-14 17:03:21 UTC
Created attachment 25877 [details] [review]
Comment 2 Michael Meeks 2009-05-14 17:06:33 UTC
Created attachment 25878 [details]
callgrind profiles before and after
Comment 3 Scott Tsai 2009-05-14 20:57:33 UTC
The new 'resolve_udiprop_path' in the patch doesn't have 'udi_result_size' and 'prop_result_size' parameters but the copy and pasted comment block still have '@param  prop_result_size'.
Comment 4 Michael Meeks 2009-05-18 03:53:55 UTC
Scott - true; a trivial fix is required there as it's committed ;-)
Any other review ? and/or who might merge this ?
Comment 5 Kay Sievers 2009-07-18 04:18:52 UTC
part of 0.5.13

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.