shlwapi: optimise path functions

Andrew de Quincey adq_dvb at lidskialf.net
Sat Nov 29 17:27:03 CST 2003


Using my new profiling stuff, I've eliminated one of the performance problems 
in IDA. 

It turned out the functions in shlwapi/path.c call CharNextA()/CharNextW() to 
advance characters in strings.. Although these calls are not individually 
that slow, the number of times they're used when opening the file dialog 
causes a massive delay (IDA supplies quite a large filter string to select 
files in the file dialogue, and iterating over the characters in this many 
times is what causes the problem).

I've replaced the calls to CharNextA()/CharNextW() with array increments and a 
local static function. This knocks 3.5 seconds off the file open dialogue in 
IDA.

BTW: I'll submit a patch with the profiling stuff tomorrow after I've finished 
cleaning it up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-pathopt.patch
Type: text/x-diff
Size: 5279 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20031129/3a7f6ced/wine-pathopt.bin


More information about the wine-patches mailing list