Hi All, On Wed, Apr 16, 2008 at 10:21 PM, Jürgen Kareta wrote: > Tim Golden schrieb: > > > [EMAIL PROTECTED] wrote: > > > >> Hi Andrea, > >> > >> the code in my first link was from the mercurial extension TortoiseHG. They > >> found some issues that the icon overlay slows down network devices. See > >> here: > >> > >> https://sourceforge.net/tracker/index.php?func=detail&aid=1892791&group_id=199155&atid=968354 > >> > >> Could you please tell if you have the same issues with the code Roger > >> posted ? > >> > > > > Worth noting that *any* code which is messing with icon overlays should > > be just about as tight as it can possibly be. TortoiseSVN, which is written > > in > > C++ has been doing this for years, tweaks its overlay & cache code on > > pretty much every minor release to squeeze some more performance. > > > > I had a quick glance at the TortoiseHg code and was a bit surprised that > > the key _get_state function isn't as tight as it might be. I say that, > > however, > > with a huge amount of diffidence as I've had nothing whatsoever to do with > > it and I imagine the developer's tried all sorts of tricks to speed things > > up. > > > > If the problem only seriously affects network drives, it's likely that the > > code's > > doing too many calls to query file existence and attributes, all of which > > will > > suffer on a (slower) network connection. > > > > Be interesting knowing whether other overlay handlers such as > > TortoiseSVN/CVS > > cause the same problem, whether a simple no-op or one-op implementation > > of _get_state ameliorates things, or whether the added layer of the Python > > interpreter is causing the problems. > > > > As a side note, might be worth tying in to the TortoiseOverlays projects > > which provides for a shared set of overlays for all Tortoise.. projects, > > preventing problems with the rather low system limit. (Don't imagine it > > would help speed things up, tho', since it introduces *another* layer > > into the stack). > > > > Perusing the code at: > > > > http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseShell/IconOverlay.cpp > > > > was very instructive! Worth checking the repos out to look at the log, too. > > > > TJG > > _______________________________________________ > > python-win32 mailing list > > python-win32@python.org > > http://mail.python.org/mailman/listinfo/python-win32 > > > > > > > Andrea: Thanks for testing and reporting > > Tim: Thanks for giving so much detailed insights to it and of course I'm > looking forward to read your cookbook about shell extensions written in > Python ;-). By the way I have nothing to do with TortoiseHg, it was just > one codeexample discussed on this list last january that I linked to on > the wxpython list. While Rogers code seems to be a bit shorter, my quick > and inexperienced look at the codes made me thinking that both examples > do basically the same. That was the reason for my question. But > nevertheless either the shell extensions and TortoiseHg are really > interesting topics. And maybe the TortoiseHg project can also get their > benefit out of this discussion.
Just an update: I have managed to make it running both as a Python script and as a standalone executable/dll. It's working fine and it's not slowing down our network connections: everything seems as fast as before. A big thank you to Roger and Tim for their kind help! Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.alice.it/infinity77/ _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32