{"id":504,"date":"2009-02-14T13:27:59","date_gmt":"2009-02-14T18:27:59","guid":{"rendered":"http:\/\/www.summet.com\/blog\/?p=504"},"modified":"2009-02-14T13:27:59","modified_gmt":"2009-02-14T18:27:59","slug":"mythwelcome-menu-gui-slowness","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2009\/02\/14\/mythwelcome-menu-gui-slowness\/","title":{"rendered":"MythWelcome Menu \/ GUI slowness"},"content":{"rendered":"<p>On my 0.21-release-fixes codebase, MythWelcome would pause for a long time (2-3 seconds) after I pressed the &#8220;MENU&#8221; key before making the menu pop up.   This was because a call to &#8220;mythshutdown &#8211;status&#8221; was taking several seconds to return, and MythWelcome waited for the return value of that message before drawing the menu (It wanted to know if it should draw a &#8220;unlock&#8221; or a &#8220;lock&#8221; button.)<br \/>\n<!--more--><\/p>\n<p>I suspect that mythshutdown &#8211;status isn&#8217;t supposed to take this long, but I&#8217;ve coded up a quick hack in mythWelcome that fixes the UI pause problem.  <\/p>\n<p>Because MythWelcome periodically checks the status of the system (in the updateStatusMessage function), I just cached this status in a global variable. When the &#8220;Menu&#8221; event is processed, it checks the cached status variable and draws the menu immediately, (only calling &#8220;mythshutdown &#8211;status&#8221; if the status has not already been cached.)<\/p>\n<p>Obviously, if somebody changes the lock status of the machine between the last call to updateStatusMessage and the &#8220;Menu&#8221; button being pressed, the menu will have the wrong button on it. (I am willing to live with this.)<\/p>\n<p>I am not suggesting that the attached patch be integrated with the MythTv codebase (my understanding is that the code in Trunk does not suffer from the problem I am trying to solve), but if you are running 0.21 and want to solve the problem I&#8217;ve described, the following patch (to programs\/mythwelcome\/welcomedialog.cpp) will do it.<\/p>\n<p><a href='http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2009\/02\/mythwelcome_patch.diff'>mythwelcome_patch<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On my 0.21-release-fixes codebase, MythWelcome would pause for a long time (2-3 seconds) after I pressed the &#8220;MENU&#8221; key before making the menu pop up. This was because a call to &#8220;mythshutdown &#8211;status&#8221; was taking several seconds to return, and &hellip; <a href=\"https:\/\/www.summet.com\/blog\/2009\/02\/14\/mythwelcome-menu-gui-slowness\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[14,63],"class_list":["post-504","post","type-post","status-publish","format-standard","hentry","category-projects","tag-mythtv","tag-mythwelcome"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=504"}],"version-history":[{"count":0,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/504\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}