[Bug 45815] FamiTracker etc. use much more CPU in Wine than Windows

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Oct 1 03:52:30 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45815

--- Comment #4 from jimbo1qaz <jimbo1qaz at gmail.com> ---
The symbols perfectly match source files located at C:\Program Files
(x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.15.26726\atlmfc\src\mfc\*.cpp . (Note
that VC++ bundles precompiled MFC libraries from the same source, and does not
compile these source files. I have tried and failed to find a way to compile
them in my own Visual Studio project, let alone GCC.)

- 63.48% 0x503467
   - 0x4196de
      - 63.44% 0x50ad24 CFamiTrackerApp::OnIdle
         - 63.36% 0x503202 CWinApp::OnIdle
            - 56.73% 0x4f8556 CWinThread::OnIdle
               - 44.25% 0x4f8556 CWnd::SendMessageToDescendants
                  - 14.21% 0x4f855f
                     + 13.62% 0x7eb06646 user32 (#define GetNextWindow
GetWindow)

                  - 13.49% 0x4f853d
                     + 13.29% 0x7eb0838b user32 (GetTopWindow)
                        + 12.91% 0x7eb06646 user32 (GetWindow)

                  - 10.55% 0x4f851e returns to wincore.cpp:3025
SendMessageToDescendants
                     - 10.36% 0x4f3cfa AfxCallWndProc
                        - 10.16% 0x4f8b7a CWnd::WindowProc
                           - 10.06% 0x4f548d CWnd::DefWindowProc
                              calls CallWindowProcA at 7EB15C80
                              - 9.95% 0x7eb16e6d user32 (CallWindowProcA?)

                  Normal, probably also found on Windows:
                  - 2.40% 0x4f8556 ::GetNextWindow
                     - 1.16% 0x4f8556 ::GetNextWindow
                        - 0.58% 0x4f851e returns to wincore.cpp:3025
SendMessageToDescendants
                           - 0.56% 0x4f3cfa AfxCallWndProc
                              - 0.56% 0x518676 Render toolbars.
                                 - 0x4f8b59
                                    - 0.55% 0x4f7a28
                                         0.52% 0x517acd
                  - truncated

               + 9.58% 0x4f851e
               + 1.07% 0x4f855f
               + 1.05% 0x4f853d
               - 0.54% 0x4f84fa
                  - 0.53% 0x7eb0838b
                       0.52% 0x7eb06646
            + 3.84% 0x4f851e
            + 1.09% 0x4f853d
            + 1.08% 0x4f855f

CWinApp::OnIdle has no loop, calls:

CWinThread::OnIdle has no loop, calls:

CWnd::SendMessageToDescendants loops through:
for (HWND hWndChild = ::GetTopWindow(hWnd); hWndChild != NULL;
        hWndChild = ::GetNextWindow(hWndChild, GW_HWNDNEXT))

Using never-breakpoints in x32dbg, I ran j0CC for over a minute:
- CWnd::SendMessageToDescendants gets called 5082 times
- The for loop gets executed 42964 times (which seems fairly normal).

I think user32 is too slow. Specifically: GetTopWindow, GetWindow,
CallWindowProcA

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list