Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - High CPU Utilization with Xtreme Suite
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

High CPU Utilization with Xtreme Suite

 Post Reply Post Reply
Author
Message
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Topic: High CPU Utilization with Xtreme Suite
    Posted: 04 March 2004 at 1:05pm

While developing one of my applications using the ActiveX Xtreme Suite, I noticed that CPU utilization was abnormally high.  I initially attributed this to the type of processing I was doing in the CommandBars 'Update' event to ensure my toolbars were properly enabled/disabled.  Since this event was constantly firing when a toolbar was visible, I assumed I needed to minimize the amount of processing performed in this routine.  After spending tens of hours trying to minimize and tweak my code to decrease CPU utilization, I ran out of ideas and never got the CPU at an acceptable level.

I since started working on another application that did not involve a lot of processing in the 'Update' event.  I was suprised to later find out that the application still had high CPU utilization.

I finally decided to build a test applicaiton that was similar in design to my other applications except that it did very little (if any) processing.  All it does is load and display forms.  There is no updating of any CommandBarControls.

The application is a typical MDI application.  The MDI Form has a CommandBars control that supplies the main menu (no toolbars).  Each child window contains two docked panes (one with a PropertyGrid and the other with a TextBox).  In one version of the application, the two docked panes also contain a CommandBars object (although nothing is loaded or displayed for those controls).

Now I have two similar applications:

  1. ResourceTest.exe - application with CommandBars on each docked pane in the Child Window
  2. ResourceTest2.exe - application with no CommandBars on the docked panes of the Child Window

I then performed some basic tests on two machines.  On each machine, I invidivually loaded each of the two applications.  I would then open new child windows and watch the percentage of CPU utilization in the Task Manager as I added new windows.  I would also check the impact that DocumentTabs had on CPU utilization.  Since ResourceTest2.exe did not have CommandBars on each child form, I expected it to consume less of the CPU.  The results are below:

Pentium 4 1.7GHz 256MB RAM WinNT 4.0
ResourceTest.exe
    10 Childs = 20% (20% no Doc Tabs)
    15 Childs = 50% (40% no Doc Tabs)
    18 Childs = 99% (80% no Doc Tabs)
ResourceTest2.exe
    10 Childs =  0% ( 0% no Doc Tabs)
    20 Childs =  0% ( 0% no Doc Tabs)
    30 Childs = 30% (20% no Doc Tabs)
    35 Childs = 99% (25% no Doc Tabs)
    38 Childs = 99% (95% no Doc Tabs)

Pentium II 400MHz 256MB RAM Win2000
ResourceTest.exe
     5 Childs = 10% (10% no Doc Tabs)
    10 Childs = 80% (70% no Doc Tabs)
    15 Childs = 99% (95% no Doc Tabs)
ResourceText2.exe
    10 Childs = 10% ( 5% no Doc Tabs)
    20 Childs = 70% (50% no Doc Tabs)
    25 Childs = 99% (99% no Doc Tabs)

These results show a lot of CPU utilization considering the application itself is doing nothing.  I've attached the project source code and exectable files for the two test applications.  You'll need CommandBars, DockingPane, and PropertyGrid registered on the machine to run the examples.

Dont' get me wrong.  I absolutely love these controls!!  They provide a very professional look-and-feel to the application.  My concern is that my clients will not want to use my application if it is constantly consuming a minimum of 10% of the CPU.

Has anyone else seen this problem?  Is there something I'm doing wrong in my implementation of the controls?

Codejock, can anything be done to reduce CPU utilization?

Sample Projects Attached: DZ1_ResourceTest.zip

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2004 at 2:08am

Thans for detailed description of problem.

You and SuperMario make good work in our forum. We made some changes and if you wish I can send you beta to test.

SuperMario, if you want to test beta I will send to you too.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2004 at 7:21am

Hi Oleg,

I would be happy to take a look at the beta.  Please send me a private message or e-mail with a link to the files.  Would this be a beta of 8.62 or a recompile of 8.61 with performance tweaks?  I'm sure you're trying to wrap up the 8.62 release, so I'll try to provide feedback as quickly as possible.

QA Testing is my official career (software development is a side job), so I'm glad my participation in the forums has helped.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.