[mythtv] Reducing frontend startup time

warpme warpme at o2.pl
Fri Jan 8 19:31:59 UTC 2016


> Wiadomość napisana przez Lawrence Rust <lvr at softsystem.co.uk> w dniu 08.01.2016, o godz. 20:10:
> 
> On Fri, 2016-01-08 at 13:57 -0500, Dan Wilga wrote:
>> On 1/8/16 1:54 PM, Lawrence Rust wrote:
>>> Hi all,
>>> 
>>> I've put together 5 patches on the devel/lvr/startup branch which
>>> together considerably reduce the startup time on remote frontends.  The
>>> saving is especially significant on my Raspberry Pi's where the time is
>>> reduced from around 15 seconds down to 5.
>>> 
>>> The changes mainly introduce static caches around MySQL select
>>> operations that retrieve static settings.  I've also included a patch to
>>> UPnP startup to make the UPnP announcement run in it's own thread and so
>>> not delay the main thread - this saves a second or so.
>>> 
>>> I've been using these patches on my own systems for a couple of years
>>> now.  But before I pushed I wanted to give everyone a chance to comment
>>> on them as they have a significant impact on the database.
>> Hi Lawrence,
>> 
>> You've made so many (wonderful!) changes in that branch that it can be 
>> difficult to find just these few changes. Could you please post some links?
> 
> Sure,
> 
> DB: Load all dbase settings into cache at startup
> https://github.com/MythTV/mythtv/commit/37c2c3ce047a442930830060daf8e1faee1a7152 <https://github.com/MythTV/mythtv/commit/37c2c3ce047a442930830060daf8e1faee1a7152>
> 
> DB: Update settings cache in SaveSettingOnHost
> https://github.com/MythTV/mythtv/commit/8d987c9d5baf15cbdd4de18dea7272e8cadc6cd2 <https://github.com/MythTV/mythtv/commit/8d987c9d5baf15cbdd4de18dea7272e8cadc6cd2>
> 
> SimpleDBStorage: Where possible use Get/SetSetting to speed frontend
> https://github.com/MythTV/mythtv/commit/2181ecca4f35ba0dd39182802e74a3a1c6bcb076 <https://github.com/MythTV/mythtv/commit/2181ecca4f35ba0dd39182802e74a3a1c6bcb076>
> 
> UI: Provide dbase cache for RegisterKey and RegisterJump to speed sta
> https://github.com/MythTV/mythtv/commit/bea896e448e7a7fd6c6f2b2d46e11f636fe034a3 <https://github.com/MythTV/mythtv/commit/bea896e448e7a7fd6c6f2b2d46e11f636fe034a3>
> 
> UPnP: Reduce startup latency by moving blocking code to own thread
> https://github.com/MythTV/mythtv/commit/f2226b56c1c03ab76d90b9b081b2c1eb526e71f5 <https://github.com/MythTV/mythtv/commit/f2226b56c1c03ab76d90b9b081b2c1eb526e71f5>
> 
> -- 
> Lawrence Rust
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org <mailto:mythtv-dev at mythtv.org>
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev <http://lists.mythtv.org/mailman/listinfo/mythtv-dev>
> http://wiki.mythtv.org/Mailing_List_etiquette <http://wiki.mythtv.org/Mailing_List_etiquette>
> MythTV Forums: https://forum.mythtv.org <https://forum.mythtv.org/>
Lawrence,
I’m using first 4 patches in MiniMyth2 since months with v.good results.
On ION1, FE startup time is reduced from 12-13sec to 7-8sec.
No single stability issue noticed.
IMHO patches are good candidates to be included into official code.
 
I think current FE has also another area of additional start speed-up: Bonjur startup.
Currently it is in main thread and takes some sec. on startup.

BTW: In my case Bonjur code also has bug: if there is enabled AirPlay video - there is race in concurrent starting audio and video Bonjur services leading to FE crash. 
In Minimyth2 crash is average per 10-15 starts.


  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20160108/5460a061/attachment.html>


More information about the mythtv-dev mailing list