Hey Thanks for the feedback :).
~200 context switches per second (or whatever interval we are talking about here) does sound like a lot in light of how little work the tray icon has when idling. This is not a problem at all for modern CPUs though. Note that Chrome - one of the lightest browsers available - in that screenshot triggers 10x this number (not meant as an excuse, but rather to illustrate how small a number we are talking about). What the tray icon actually does when idle is to check the service status and look for a killfile every 5 seconds. I suspect that the cause of these context switches are the timer for these check. I'm not entirely sure how the timers are implemented in Autohotkey (the language the tray manager is coded in), but chances are that the implementation is less-than-ideal for our purpose. Nevertheless, we are (IMHO) talking very fine details here. In the perfect world, with unlimited time, it might be worth looking into. But in the real world, there are so many more important things to work at than worrying about a couple of hundred context switches :). - Zero3 Ian Clarke skrev: > My wife made the following discovery about the Windows Freenet tray icon: > > ---------- Forwarded message ---------- > From: *Janie Mehew* <...> > Date: Fri, Dec 4, 2009 at 11:33 AM > Subject: Freenet tray icon - forward to mailing list > To: Ian Clarke <ian.clarke at gmail.com <mailto:ian.clarke at gmail.com>> > > > Hi, > > I have noticed that the freenet tray icon seems to be using more > resources than it needs to. If I open process explorer, and sort the > entries by CSwitch Delta, the freenettray.exe program is always in the > top 5-10. On my computer it seems to be around 200 per update interval. > This indicates that the tray icon is using more CPU than it probably > needs to. For an explanation, see here: > > http://blogs.technet.com/sysinternals/archive/2004/04/27/452830.aspx > > By comparison, my product's tray icon polls our service over RPC every > few seconds, and never seems to have a CSwitch delta higher than 5. > > I've attached a screenshot of process explorer. > > Janie > > > > -- > Ian Clarke > CEO, Uprizer Labs > Email: ian at uprizer.com <mailto:ian at uprizer.com> > Ph: +1 512 422 3588 > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Devl mailing list > Devl at freenetproject.org > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl