Current filter:
                                You should refresh the page.
                                  • I am seeing a lot of CPU time used by my application when it is idle. It's OK on fast machines but I have a number of clients (more than I would care to admit) on old computers and my application is pegging their CPU.
                                    I can actually reproduce the symptoms using the RibbonNotepadDemo.
                                    The problem seems to be a repeating set of user defined messages being sent [User-defined:WM_APP+12351]. I can see the same messages in both the Ribbon demo and my application. I have a second application that uses DevExpress grids and edit controls, but not the Bars. That application is quiet when idle.
                                    In the ribbon demo you see the repeating block of messages listed below. I have partially traced this back to the status bar trying to update the key status. The key status causes the timer message below. These messages will repeat even if the application does not have focus. If I remove the status bar I make things a little better; there are no messages when the application does not have focus. But as soon as I make the application have focus the messages start again - just as below but without the timer message.
                                    In my application I seem to be doing something to send even more of these messages. When a specific part of my application is active it uses 10% of a single cpu on a i7 machine. The selection is a place holder for images that enabled scanning menu options. The Twain drive come up but then everything is slow because the CPU is pegged by these messages as the scanning is taking place.
                                    I've tried to trace and find out what these messages are doing. I was hoping I could disable something or change a property on the Ribbon to reduce the number of messages. So far I have been unable to figure out what they are for.
                                    Any help is appreciated.
                                    -----
                                    Messages captured from Spy++; Original RibbonNotepadDemo with Status bar left in place:
                                    <02414> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E67F0
                                    <02415> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02416> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E68A0
                                    <02417> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02418> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6D70
                                    <02419> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02420> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6CC0
                                    <02421> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02422> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6950
                                    <02423> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02424> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6B60
                                    <02425> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02426> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6C10
                                    <02427> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02428> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6AB0
                                    <02429> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02430> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6A00
                                    <02431> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02432> 00060B86 P WM_TIMER wTimerID:1 tmprc:00000000
                                    <02433> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E67F0
                                    <02434> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02435> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E68A0
                                    <02436> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02437> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6D70
                                    <02438> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02439> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6CC0
                                    <02440> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02441> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6950
                                    <02442> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02443> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6B60
                                    <02444> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02445> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6C10
                                    <02446> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02447> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6AB0
                                    <02448> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000
                                    <02449> 00080B82 S message:0xB03F [User-defined:WM_APP+12351] wParam:00000000 lParam:023E6A00
                                    <02450> 00080B82 R message:0xB03F [User-defined:WM_APP+12351] lResult:00000000

                                • Mark Elder 07.29.2011

                                  I think I figured it out. Any time a user message is posted all of the Updates for Actions are executed. We were posting a message in an OnUpdate event to update a label on the ribbon. This caused and actions to update again putting us into the loop.
                                  We were Posting a message because the TdxBarStatic item has support for actions. That means you can't set its text directly in an OnUpdate event. If you do it will invalid the control handle when the label is recreated causing the ActionManager to fail with a list index out of bounds.
                                  I'm not sure how we are going to get the label updated. We may just drop updating the label for now. At least I have a better understanding of what is happening.

                                0 Solutions

                                Creation Date Importance Sort by