[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 01:30:25 CDT 2018


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

--- Comment #3 from jimbo1qaz <jimbo1qaz at gmail.com> ---
j0CC has an undocumented console output mode.
`j0CC_FamiTracker.exe -console`

## OnTimer and OnIdle

CFamiTrackerView::OnTimer
- Intended: 1 call per 20ms = 50 call/s
    + OnTimer(0) is called in the background. OnTimer(1) only when scrolling
(in practice, only via mouse clicks, other forms of scroll don't call it).
- Windows: 20-40 call/s
- Debian VM Wine: ~50 call/s
    + Wine is actually more correct and consistent.
- Ubuntu Wine:

CFamiTrackerApp::OnIdle
- Intended: whenever idle
- Windows: OnIdle(0 and 1) are called equally.
    + OnIdle(0) OnIdle(1) each called 40 times per second normally.
    + nearly 200 times/second if I'm waving mouse rapidly over the window.
- Debian VM Wine:
    + OnIdle(0) called 50/second.
    + OnIdle(1) called ~10/second.
    + Waving mouse around does not affect call rate.

In my Debian Stretch VM (wine 3.16), 0x502dc4 uses negligible cpu, while only
0x503467 (CFamiTrackerApp::OnIdle) does.

(x32dbg's memory mappings are only correct when executing the debugger under
Wine. The addresses are not valid under Windows.)

https://stackoverflow.com/questions/8349677/how-cwinthreadonidle-is-used "MFC
uses its default OnIdle processing to enable and disable menu items and toolbar
buttons, as you can see in the documentation for CWinApp::OnIdle"...

https://msdn.microsoft.com/library/e426a3cd-0d15-40d6-bd55-beaa5feb2343.aspx#cwinapp__onidle

OnIdle(0) is handled by MFC itself (CWinApp::OnIdle(lCount) returns TRUE and
the function returns.)
OnIdle(1) is handled by 0CC.
Unfortunately CWinApp::OnIdle this takes much longer on Wine than Windows, so
OnIdle(1) barely gets a chance to run.

-- 
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