<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : TabClientWnd using lots of CPU</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : TabClientWnd using lots of CPU]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 16 Jun 2026 04:14:02 +0000</pubDate>
  <lastBuildDate>Sun, 14 Jan 2007 03:53:12 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=6090</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU :     mgampi wrote:Hi Dan;   This...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19295&amp;title=tabclientwnd-using-lots-of-cpu#19295</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1305">Simon HB9DRV</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 14 January 2007 at 3:53am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by mgampi" alt="Originally posted by mgampi" style="vertical-align: text-bottom;" /> <strong>mgampi wrote:</strong><br /><br />Hi Dan; <div>&nbsp;</div><div>This virtual function determines whether a message in the message queue is a message good for idle processing or not. If this function returns TRUE, the OnIdleUpdate... processing is done (OnUpdateCommandUI() handlers are called).</div><div>In the default implementation WM_TIMER messages are defined as 'idle' messages, resulting in OnUpdateCommandUI() calls.</div><div>In my application, each mdi child window has started its own timer and the timer interval is about 200ms. This means that after opening one window, the OnUpdateCommandUI() handlers are called 5 times per second. 10 open child frame windows lead to 50 calls to all OnUpdateCommandUI(). This uses lots of CPU!!!</div><div>&nbsp;</div><div>So I wrote&nbsp;my own IsIdleMessage() to return also FALSE when WM_TIMER messages are handled.</div><div>&nbsp;</div></td></tr></table><br>I had to ignore most of my registered messages. I have quite a few common controls in the toolbars and updating these is / was quite expensive.<br>]]>
   </description>
   <pubDate>Sun, 14 Jan 2007 03:53:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19295&amp;title=tabclientwnd-using-lots-of-cpu#19295</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : Hi Dan;   This virtual function...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19267&amp;title=tabclientwnd-using-lots-of-cpu#19267</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 13 January 2007 at 7:21am<br /><br />Hi Dan; <DIV>&nbsp;</DIV><DIV>This virtual function determines whether a message in the message queue is a message good for idle processing or not. If this function returns TRUE, the OnIdleUpdate... processing is done (OnUpdateCommandUI() handlers are called).</DIV><DIV>In the default implementation WM_TIMER messages are defined as 'idle' messages, resulting in OnUpdateCommandUI() calls.</DIV><DIV>In my application, each mdi child window has started its own timer and the timer interval is about 200ms. This means that after opening one window, the OnUpdateCommandUI() handlers are called 5 times per second. 10 open child frame windows lead to 50 calls to all OnUpdateCommandUI(). This uses lots of CPU!!!</DIV><DIV>&nbsp;</DIV><DIV>So I wrote&nbsp;my own IsIdleMessage() to return also FALSE when WM_TIMER messages are handled.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 13 Jan 2007 07:21:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19267&amp;title=tabclientwnd-using-lots-of-cpu#19267</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : What is this override used for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19256&amp;title=tabclientwnd-using-lots-of-cpu#19256</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1322">danpetitt</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 12 January 2007 at 5:56pm<br /><br />What is this override used for then and what did you do, just return FALSE?]]>
   </description>
   <pubDate>Fri, 12 Jan 2007 17:56:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19256&amp;title=tabclientwnd-using-lots-of-cpu#19256</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : Hi Simon;  I agree by 100%....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19248&amp;title=tabclientwnd-using-lots-of-cpu#19248</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 12 January 2007 at 1:26pm<br /><br />Hi Simon;<DIV>&nbsp;</DIV><DIV>I agree by 100%. In my case I had a MDI application with online trending document types. These documents used timers (WM_TIMER messages) posted by the individual MDI child frame windows to update their contents. These WM_TIMER messages increased the CPU usage due to excessive calls of OnIdleUpdate... .</DIV><DIV>After overriding&nbsp;the IsIdleMessage the CPU usage went down to 0% from up to 100% when more than 10 to 15&nbsp;documents were open!</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 12 Jan 2007 13:26:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19248&amp;title=tabclientwnd-using-lots-of-cpu#19248</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : Another thing to consider is CWinApp::IsIdleMessage...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19222&amp;title=tabclientwnd-using-lots-of-cpu#19222</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1305">Simon HB9DRV</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 12 January 2007 at 3:32am<br /><br />Another thing to consider is <b>CWinApp::IsIdleMessage</b> - if you override this you can greatly reduce idle processing.<br>]]>
   </description>
   <pubDate>Fri, 12 Jan 2007 03:32:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19222&amp;title=tabclientwnd-using-lots-of-cpu#19222</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : Thank you, I hadnt got around...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19219&amp;title=tabclientwnd-using-lots-of-cpu#19219</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1322">danpetitt</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 12 January 2007 at 2:41am<br /><br />Thank you, I hadnt got around to reversing my change on your code. So glad it was something simple ... thanks!<br /><br />Wot great support, this could have been a nightmare to resolve if you hadnt remembered about my other change.<br /><br />Well done Oleg!]]>
   </description>
   <pubDate>Fri, 12 Jan 2007 02:41:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19219&amp;title=tabclientwnd-using-lots-of-cpu#19219</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : Hi,  in issue https://forum....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19213&amp;title=tabclientwnd-using-lots-of-cpu#19213</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 12 January 2007 at 12:47am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>in issue <a href="https://forum.codejock.com/forum_posts.asp?TID=6027" target="_blank">https://forum.codejock.com/forum_posts.asp?TID=6027</A>&nbsp;you wrote that you added <strong>pFoundItem-&gt;SetImageIndex( pFoundItem-&gt;GetImageIndex() );</strong><BR></DIV><DIV>It will Recalculate layout each time OnIdleUpdateCmdUI called. </DIV><DIV>remove it.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Set breakpoint in CalcWindowRect and be sure it called if client size changed and not all time.</DIV>]]>
   </description>
   <pubDate>Fri, 12 Jan 2007 00:47:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19213&amp;title=tabclientwnd-using-lots-of-cpu#19213</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : It looks like CXTPTabClientWnd::OnIdleUpdateCmdUI...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19201&amp;title=tabclientwnd-using-lots-of-cpu#19201</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1322">danpetitt</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 11 January 2007 at 5:43pm<br /><br />It looks like CXTPTabClientWnd::OnIdleUpdateCmdUI is calling UpdateContents which is quite a heavy function.]]>
   </description>
   <pubDate>Thu, 11 Jan 2007 17:43:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19201&amp;title=tabclientwnd-using-lots-of-cpu#19201</guid>
  </item> 
  <item>
   <title><![CDATA[TabClientWnd using lots of CPU : I got a few complaints from some...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19198&amp;title=tabclientwnd-using-lots-of-cpu#19198</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1322">danpetitt</a><br /><strong>Subject:</strong> 6090<br /><strong>Posted:</strong> 11 January 2007 at 4:56pm<br /><br />I got a few complaints from some users of my software saying that on their Dual XEON dev machines, my product was using 15-20% of the CPU in total (across 4 processors) when they werent doing anything at all.<br /><br />This figure went down slightly if they had only 1 doc open but went up significantly with lots of documents.<br /><br />After some testing, we found that if they turned off the client tabs option so they just had maximised child windows for each document it went down to 0%.<br /><br />It seems that the MDITabClientWnd is using a lot of CPU, have you noticed anything in this area and/or done any profiling on it?]]>
   </description>
   <pubDate>Thu, 11 Jan 2007 16:56:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6090&amp;PID=19198&amp;title=tabclientwnd-using-lots-of-cpu#19198</guid>
  </item> 
 </channel>
</rss>