Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 3 posts ]
Author Message
 Post subject: semi-random bug....
PostPosted: Mon Mar 13, 2006 4:52 pm 
Offline

Joined: Wed Aug 11, 2004 8:27 pm
Posts: 242
Jorge,

Thanks for the great article on how to report bugs. I have found something in WS that I cannot reproduce, but thought I should at least bring it to your attention (v. 1.91). I have found the WS will use massive amounts of CPU time (90-98%) when it is first run, and also randomly through out the day. Usually this only lasts about 10-20 sec... but somtimes I need to kill the process.

I don't expect you to try in vain to track this down, but thought I would let you know. I am trying to figure out what i going on from my end :-)

-Paul


Back to top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 7:25 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 12282
Thanks for reporting this, but it's not a bug... it's a feature!!! :D

Seriously, that's just WorkShelf polling the Internet for the information required by the several Internet related modules and functions (weather conditions, atomic clock synch, new email messages, online fortune cookie retrieval and info about application updates).

WorkShelf is not *really* hogging the CPU in detriment of other applications, it just seems that way due to what is really happening: WorkShelf is in a tight loop waiting for a response from an Internet server. For every passage in this loop, WorkShelf checks to see if the Internet server has responded. If it has not, then WorkShelf yields the CPU to other applications through a DoEvents instruction. As soon as Windows has finished with whatever the other applications are doing, it returns control to the instruction after DoEvents. So, in effect, WorkShelf is not stealing time from other applications, it is actually allowing them to run more often, but in the process it also uses whatever processing power is left.

And the keyword here is 'processing power left'. For instance, load a theme where the desktop CPU module allows you to see a list of the applications using most of the CPU. Now tell WorkShelf to check the Atomic Clock. You should see CPU usage immediately jump to 100%, with WorkShelf taking up the most of it. Now run some CPU intensive task on another program and you will notice that as the CPU percentage used by this task goes up, the CPU percentage used by WorkShelf goes proportionally down.

And since the proof is in the puddin, WorkShelf is clearly NOT hogging the CPU because all other applications continue to run unhindered and your system remains 100% responsive... Something that would not happen otherwise.

I do have to add this to the FAQ one day. Or, better yet, re-write the code so that yielding the CPU via DoEvents is no longer necessary (although that would be a lot of work just to prevent WorkShelf from appearing to be hogging the CPU).

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject:
PostPosted: Mon Mar 13, 2006 9:20 pm 
Offline

Joined: Wed Aug 11, 2004 8:27 pm
Posts: 242
Great explaination.... turns out that the email checker is to "blame" :-) WS responds slowly when it is checking the mail...


Back to top
 Profile  
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 3 posts ]
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: