shlwapi: optimise path functions

Andrew de Quincey adq_dvb at lidskialf.net
Mon Dec 1 03:52:48 CST 2003


On Monday 01 December 2003 09:32, Andrew de Quincey wrote:
> > In other words, I don't think the patch is acceptable. What I'd suggest:
> >   -- figure out why the real CharNextA() is slow, and try to fix that
> >   -- figure out why it takes so long to call CharNextW()
>
> As I said originally, its not that CharNextW/CharNextA are particularly
> slow, its the number of times they're called. Obviously calling a function
> to do a simple string increment is going to be slower.
>
> CharNextW takes on average 168.5340us. However it is called 12396 times
> when opening the save box for IDA. As I said, IDA supplies quite a large
> string of filter expressions to the save box. This results in a total time
> of 2089146.9655us being spent in the CharNextW function.
>
> I will move CharNextW to be a static function of that file to see if its
> some weirdness with external functions in WINE, or if its just calling a
> function in general.

Doh! You're right. I've just tried it with the original code again, and its 
much faster now. The save window is now taking only a couple of seconds (as 
opposed to >10!) to open. Something else must have changed on my system to 
make it faster... (perhaps fewer calls to CharNextW).

Anyway, I'll keep going at it.



More information about the wine-devel mailing list