In delving deeper into the CPU usage issue I wrote about on the list a few days ago, I've come across further strangeness I hope somebody else can explain. I realized that I was experiencing high CPU usage in the application I wrote about whether it was compiled with RB 5.5.5 or 2006r2. In 2006 the usage rate never decreases once it has elevated, which is a big problem, but the question that has me stumped is why it's going up in the first place.
It's happening when one particular application window opens. The window in question has 2 popupmenus, 1 bevelbutton, a few statictexts, 1 listbox which dominates the window, a disclosure arrow, and 12 pushbuttons in a control array. When I show the window, the following CPU usage is reported by Activity monitor: With application in front: ~44% With other application in front: ~21% With window closed: .8% The last figure is the same recorded before the window is shown initially, and after it has been shown but closed. All figures are recorded a few seconds after any change in state to allow things to settle down. Now, if I set the visible property of the two popupmenus to false so that they do not show in the window, I get dramatically different readings: With application in front: 8.3 - 8.5% With other application in front: ~1% With window closed: .8% So I figured there was code being called constantly in these controls that was causing such high CPU usage. But addding breakpoints in both of their Change event handlers showed no such code execution. Furthermore, making the controls visible again but commenting out their code and all code that refers to either of the popupmenus results in usage figures only 1 - 2% lower than the first set above. And hiding just one of the popupmenus, no matter which one it is, makes only a slight difference: With application in front: ~35% With other application in front: 16 - 17% With window closed: .8% Does anybody have any suggestions for why hiding these popup menus should make such a difference in CPU usage? I've tried everything I could think of in the last few days with no improvement or explanation. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
