[mythtv] #10305 heads up, mysql.txt removal + config.xml changes + UPnP fixes

Lawrence Rust lvr at softsystem.co.uk
Thu May 3 19:48:29 UTC 2012


On Thu, 2012-05-03 at 15:21 -0400, Michael T. Dean wrote:
> On 05/03/2012 03:02 PM, Lawrence Rust wrote:
> > On Thu, 2012-05-03 at 11:24 -0400, Daniel Kristjansson wrote:
> >> I've attached the latest patchset to the ticket. I just wanted to
> >> give everyone a heads up in case they had strong opinions on the
> >> config.xml format or want to look at the UPnP backend discovery
> >> changes.
> >>
> >> Summary of changes:
> >> * Format of config.xml
> >>   + Database settings have their own top-level instead of being under
> >>     <MythFrontend><DefaultBackend>.
> >>   + Wake On Lan settings have been added to config.xml, these
> >>     were formerly only settable using mysql.txt.
> > The parsing of xml files is just a total waste of CPU resources.  They
> > add no useful information c.f. a well constructed ini file,
> 
> FWIW, I think any machine that can handle running MythTV (or even 
> scripts that use MythTV) can handle parsing a 500B XML file.  Yes, I 
> realize that's nearly a half kilobyte, but still...  ;)

Why do we bother to optimize our code then?  There's always more RAM and
a faster CPU...

> >> * mysql.txt reading has been removed. This does not port over
> >>    Wake On Lan settings and all other settings not written to the
> >>    file by default are ignored.
> > There are many 3rd party scripts that rely on mysql.txt.  It can contain
> > the same information as config.xml and takes just a fraction of the CPU
> > resources to parse.  Why not settle for this file alone?  Or, what about
> > a halfway house - a config utility that takes simple command line
> > queries and returns simple text strings.
> 
> The bindings--both Perl and Python (and PHP?)--use only config.xml and 
> ignore mysql.txt.  When it was added (long ago), the decision was made 
> that it would be used for all future stuff, but we just haven't gotten 
> around to actually removing the mysql.txt stuff until now.

php doesn't have(need) specific Myth bindings.  It can, and does, use
both file formats.

> Whichever file we use, we need only one.  I really don't see any reason 
> why mysql.txt is better than config.xml--it will never contain a lot of 
> information, so...

Why break so many things when there's no need.  It's so easy to 'knock
up' a mysql.txt for a specific occasion.

-- 
Lawrence


More information about the mythtv-dev mailing list