[mythtv-users] MythTV Raspberry Pi2 frontend testers

Lawrence Rust lvr at softsystem.co.uk
Tue Jan 5 20:26:18 UTC 2016


On Tue, 2016-01-05 at 09:55 +1100, Kingsley Turner wrote:
> On 05/01/16 01:55, Lawrence Rust wrote:
> > BTW I have created a new RPi branch with the promised database
> > optimisations.  Timing the startup latency shows a significant reduction
> > from ~16 secs to ~5 seconds.  The RPi is using 802.11n WiFi and the
> > BE/MySQL server is on Gigabit Ethernet.  It would be interesting to know
> > if this alleviates your slow video gallery startup time.
> >
> > To checkout the code follow the instructions here
> > http://www.softsystem.co.uk/download/mythtv/mythtv_for_rpi.txt
> >
> > but substitute the branch name 'fixes-0.27-rpi2-dbase'
> 
> Before I applied this patch I noticed that it really is the number of files 
> in the library causing the delay.
> 
> Post-patch I don't notice much of a difference to be honest.  I was only 
> counting seconds in my head though.
> So I've gone back to the pre-patch binaries, rebooted.
> 
> Main Menu -> Watch Videos ... 67 seconds.
> Videos Root Menu -> Folder316 ... 108 seconds. (nearly all sub-folders, > 
> 7000 files)
> Videos Root Menu -> Folder169 ... 1 second (so sub-folders in here)
> Videos Root Menu -> Folder50 ... 4 seconds (mostly sub-folders, > 1500 files)
> Returning to the Videos Root Menu (from Folder50) ... 22 seconds (why is 
> this faster?)
> 
> Post-patch binaries, after reboot:
> 
> Main Menu -> Watch Videos ... 66 seconds.
> Videos Menu -> Folder316 ...  107 seconds.
> Videos Menu -> Folder169 ... 1 second
> Videos Menu -> Folder50 ... 4 seconds
> Returning to the Videos Root Menu (from a sub-folder) ... 21 seconds
> 
> This looks identical.  The 1 second could just be me getting better at the 
> stop-watch app.
> I wonder if the build, didn't.
> Scrolling back, it has definitely compiled some stuff.

Oh well, not as impressive as hoped.  Does the FE start that much
quicker than before?  If it does then you have an updated version, if
not then the changes didn't get applied.

> Aside ~
> 
> It seems like mythtv is querying the whole video tree (from the database or 
> otherwise) for the nett result of the folder background images, and file 
> count of the sub-folder.  Without looking at the code, I'm wondering is some 
> of this information could not be determined on the server-side-SQL rather 
> than computed locally. E.g.: selecting count(*) for a subfolder content.
> 
> Maybe the whole lot could be cached for /X/ minutes ?  (where /X/ is 
> proportional to the time it takes to fetch).  I wouldn't mind waiting a 
> minute for it to read-up the library content, IFF I knew it wasn't going to 
> do it again for some hours, or again next week.

The new patches do cache certain SQL operations but maybe not the ones
relevant to the video tree.  I will have a delve into the code and see
if there's not a caching opportunity being missed.  It may take a week
or so but I'll get back to you on this.

-- Lawrence Rust



More information about the mythtv-users mailing list