[mythtv] Reducing frontend startup time

Lawrence Rust lvr at softsystem.co.uk
Sat Jan 9 10:32:23 UTC 2016


On Fri, 2016-01-08 at 17:42 -0500, Peter Bennett wrote:
> On 01/08/2016 01: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.  
> >
> > Thanks.
> >
> Hi Lawrence
> 
> You have been posting changes for some time now, and I would like to try
> them. I have not done a build yet, just used your precompiled archive
> files up to now.

There's a pre-compiled archive (for wheezy) here:
http://www.softsystem.co.uk/download/mythtv/mythtv-v0.28-pre-3350-gf2226b5-RPI2.tar.bz2

>  Can I do a build using the instructions in
> mythtv_for_rpi.txt, substituting the github repo for the
> www.softsystem.co.uk repo?

Yes, just execute:

# checkout MythTV repository
git clone -b devel/lvr/startup git://github.com/MythTV/mythtv.git
cd mythtv
...

# or if you already have the MythTV repo
cd mythtv
git checkout -b startup  devel/lvr/startup

>  Must I still use mythbuild.sh or can I use
> ./configure and make?

It's simplest to cross-compile using the mythbuild.sh script.  Building
natively (on a RPi or VM) is much slower (RPi >= 12hrs) and more
complex.

>  Is mythbuild.sh now in github?

No, get it from my website:
http://www.softsystem.co.uk/download/mythtv/mythbuild.sh

or together with my patches:
http://www.softsystem.co.uk/download/mythtv/mythbuild-CURRENT.zip

>  Can the same github
> branch be built for x86_64 and for arm?

Yes, the devel/lvr/startup branch is just current master plus the 5
database patches.  Remember to "git clean -fxd ." when switching
targets, or if using mythbuild.sh then append a -E option.

-- 
Lawrence Rust



More information about the mythtv-dev mailing list