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.
Created attachment 25877 [details] [review]
Created attachment 25878 [details]
callgrind profiles before and after
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'.
Scott - true; a trivial fix is required there as it's committed ;-)
Any other review ? and/or who might merge this ?
part of 0.5.13
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.