[python-win32] killing overlay extensions

Mark Hammond mhammond at skippinet.com.au
Tue Jul 8 09:29:06 CEST 2008


 
> The debugging trace suggests that IsMemberOf  are called after
> GetOverlayInfo, which itself is called when Explorer starts up.

That is correct - GetOverlayInfo is called just once per process IIUC.
Having this function fail should prevent your IsMemberOf being called - but
once it has been successfully called, you are in the same position you are
now.

> In any case, as I said in my reply to Mark, Explorer slows down
> noticeably just by having the extensions turned on, i.e, calling the
> IsMemberOf function. Probably due to the overhead within pythonwin COM
> mechanism.

That would surprise me, as the overhead should not be much at all - a lock
acquisition, creation of a tuple for the args, getattr for the function and
a few calls.  No IDispatch is involved here, so there isn't much magic at
all.  For most folders, you can expect one call per file - which typically
will only be in the dozens of files.

So if the overhead of doing nothing is too great, I can't see how the
extension could do much work at all.  In other words, I'd be quite surprised
if the overhead of a Python implementation that does nothing is more than
the (say) C++ TSVN overhead when it is actually talking to subversion,
stating files on disk, parsing the 'entries' file, etc.  TSVN uses locks
quite liberally too, etc....

Maybe we need to measure this overhead somehow? There are probably some
optimizations we can make in some cases too - eg, caching the function
objects rather than looking them up each call, etc, but as implied above,
I'd be very surprised to see that make a measurable difference unless the
number of calls is truly huge and the real work being done by the function
is close to zero.

Cheers,

Mark




More information about the python-win32 mailing list