Performance issue with obtaining Home Page with 1.3.0
Posted: Sat Dec 31, 2016 12:41 pm
Can no longer report problems anonymously on SourceForge (I guess due to some recent odd entries selling items !) and with their recent reputation do not want to register so logging a further update to https://sourceforge.net/p/moneymanagerex/bugs/917/ here
I have not fixed the problem but have found how to switch it on and off
The "View Reports without Future Transactions" appears to be the culprit which is off by default.
The following is the first few lines from a VS2015 Performance Report (Functions sorted by Inclusive Samples)
Start mmex and shutdown when Homepage appears
With Future OFF - home page almost instant
Function Name Inclusive Samples
__scrt_common_main_seh 828
wxEntry 824
wxEntryReal 824
wxEventLoopBase::Run 479
wxEventLoopManual::DoRun 479
[user32.dll] 468
wxAppConsoleBase::MainLoop 459
wxGUIEventLoop::Dispatch 418
wxEventLoopManual::ProcessEvents 418
wxGUIEventLoop::PreProcessMessage 378
wxGUIEventLoop::ProcessMessage 378
mmGUIApp::OnInit 279
OnInitImpl 279
mmGUIFrame::mmGUIFrame 273
[ucrtbase.dll] 171
mmGUIFrame::createHomePage 149
mmHomePagePanel::Create 143
mmHomePagePanel::mmHomePagePanel 143
wxEvtHandler::ProcessEvent 105
wxEvtHandler::TryHereOnly 103
sqlite3CodecFree 100
and with Future ON - home page takes some 20 seconds to appear
Function Name Inclusive Samples
__scrt_common_main_seh 11,112
wxEntry 11,112
wxEntryReal 11,112
mmGUIApp::OnInit 10,756
OnInitImpl 10,756
mmGUIFrame::mmGUIFrame 10,748
mmGUIFrame::createHomePage 10,565
mmHomePagePanel::Create 10,559
mmHomePagePanel::mmHomePagePanel 10,559
[ucrtbase.dll] 10,545
mmHomePagePanel::getData 10,510
mmHomePagePanel::get_account_stats 10,470
wxGetTimeZone 10,466
ModelBase::to_date 10,435
wxDateTime::ParseISODate 10,425
wxDateTime::ParseFormat 10,423
Model_Checking::TRANSDATE 10,419
wxDateTime::ResetTime 5,236
wxDateTime::Today 5,226
wxDateTime::GetTm 5,211
wxDateTime::TimeZone::TimeZone 2,617
[user32.dll] 407
with Future ON and wxwidgets/timer mod as detailed in 917 - home page almost instant
Function Name Inclusive Samples
__scrt_common_main_seh 541
wxEntry 541
wxEntryReal 541
[user32.dll] 343
wxEventLoopBase::Run 332
wxEventLoopManual::DoRun 332
wxEventLoopManual::ProcessEvents 313
wxGUIEventLoop::Dispatch 312
wxAppConsoleBase::MainLoop 307
wxGUIEventLoop::PreProcessMessage 278
wxGUIEventLoop::ProcessMessage 278
mmGUIApp::OnInit 234
OnInitImpl 234
mmGUIFrame::mmGUIFrame 228
mmGUIFrame::createHomePage 118
mmHomePagePanel::Create 118
mmHomePagePanel::mmHomePagePanel 118
mmGUIFrame::openFile 93
Doing some basic checks suggests that
Line 192 app->m_frame = new mmGUIFrame(app, mmex::getProgramName(), wxPoint(valx, valy), wxSize(valw, valh)); in mmex.cpp is the start of the problem
but working out how this works is beyond my skills.
I have not fixed the problem but have found how to switch it on and off
The "View Reports without Future Transactions" appears to be the culprit which is off by default.
The following is the first few lines from a VS2015 Performance Report (Functions sorted by Inclusive Samples)
Start mmex and shutdown when Homepage appears
With Future OFF - home page almost instant
Function Name Inclusive Samples
__scrt_common_main_seh 828
wxEntry 824
wxEntryReal 824
wxEventLoopBase::Run 479
wxEventLoopManual::DoRun 479
[user32.dll] 468
wxAppConsoleBase::MainLoop 459
wxGUIEventLoop::Dispatch 418
wxEventLoopManual::ProcessEvents 418
wxGUIEventLoop::PreProcessMessage 378
wxGUIEventLoop::ProcessMessage 378
mmGUIApp::OnInit 279
OnInitImpl 279
mmGUIFrame::mmGUIFrame 273
[ucrtbase.dll] 171
mmGUIFrame::createHomePage 149
mmHomePagePanel::Create 143
mmHomePagePanel::mmHomePagePanel 143
wxEvtHandler::ProcessEvent 105
wxEvtHandler::TryHereOnly 103
sqlite3CodecFree 100
and with Future ON - home page takes some 20 seconds to appear
Function Name Inclusive Samples
__scrt_common_main_seh 11,112
wxEntry 11,112
wxEntryReal 11,112
mmGUIApp::OnInit 10,756
OnInitImpl 10,756
mmGUIFrame::mmGUIFrame 10,748
mmGUIFrame::createHomePage 10,565
mmHomePagePanel::Create 10,559
mmHomePagePanel::mmHomePagePanel 10,559
[ucrtbase.dll] 10,545
mmHomePagePanel::getData 10,510
mmHomePagePanel::get_account_stats 10,470
wxGetTimeZone 10,466
ModelBase::to_date 10,435
wxDateTime::ParseISODate 10,425
wxDateTime::ParseFormat 10,423
Model_Checking::TRANSDATE 10,419
wxDateTime::ResetTime 5,236
wxDateTime::Today 5,226
wxDateTime::GetTm 5,211
wxDateTime::TimeZone::TimeZone 2,617
[user32.dll] 407
with Future ON and wxwidgets/timer mod as detailed in 917 - home page almost instant
Function Name Inclusive Samples
__scrt_common_main_seh 541
wxEntry 541
wxEntryReal 541
[user32.dll] 343
wxEventLoopBase::Run 332
wxEventLoopManual::DoRun 332
wxEventLoopManual::ProcessEvents 313
wxGUIEventLoop::Dispatch 312
wxAppConsoleBase::MainLoop 307
wxGUIEventLoop::PreProcessMessage 278
wxGUIEventLoop::ProcessMessage 278
mmGUIApp::OnInit 234
OnInitImpl 234
mmGUIFrame::mmGUIFrame 228
mmGUIFrame::createHomePage 118
mmHomePagePanel::Create 118
mmHomePagePanel::mmHomePagePanel 118
mmGUIFrame::openFile 93
Doing some basic checks suggests that
Line 192 app->m_frame = new mmGUIFrame(app, mmex::getProgramName(), wxPoint(valx, valy), wxSize(valw, valh)); in mmex.cpp is the start of the problem
but working out how this works is beyond my skills.