On Sunday 30 November 2003 01:23, Dimitrie O. Paun wrote: > On November 29, 2003 06:27 pm, Andrew de Quincey wrote: > > 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. > > Well, I'm not sure this is worth doing. First off, we're not fixing any > app that makes use of CharNext{A,W}().
Er, it does. Datarescue IDA Pro. I regard the save box taking > 10 seconds to open as a bug. (Note: This fix only fixes 3.5 seconds of the problem. more work is needed) > Second, why is your static method > any faster than the real CharNextA()? Third, it's not correct to replace > CharNextW() with an array increment. While it is true that currently our > CharNextW() simply does the same thing, it should be fixed in the long > run to properly deal with Unicode Surrogate Pairs: > > http://uk.geocities.com/BabelStone1357/Unicode/surrogates.html > > 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() Its actually just the CharNextW function. The CharNextA thing I admit was premature optimisation that I have not tested and should be removed. As to why it takes so long to call CharNextW. Why indeed? Its a function defined in a DLL external to the shlwapi one. As there doesn't appear to be any funky code going on, it must be going through the normal WINE layers for calling such a function, surely?