[mythtv-users] MythTV Raspberry Pi2 frontend testers

Kingsley Turner krt at krt.com.au
Mon Jan 4 22:55:53 UTC 2016


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.


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.


-kt


More information about the mythtv-users mailing list