[mythtv] [PATCH] mythgame xml reading

Joseph A. Caputo jcaputo1 at comcast.net
Mon Sep 6 08:31:59 EDT 2004


On Sun, 05 Sep 2004 19:40:58 +0100
Charlie Brej <brejc8 at vu.a.la> wrote:

> Isaac Richards wrote:
> > 
> > You do know that there are two ways of parsing supported by Qt - DOM
> > (which reads the full file), and SAX (which parses on the fly),
> > right?
> > 
> > Isaac
> 
> No didn't (doh!) :)
> 
> Just now I wrote most of the SAX based system and it also wants to
> read the whole file in. It doesn't parse it while loading, just loads
> it into memory, but the memory consumption of mythfrontend eventually
> grows to 200Mb. I don't think it likes the popen stream. The system
> freezes while the whole xml is generated by xmame and loaded (about
> 20secs on my system). Only then does it continue to open the other two
> streams.
> 
> Its much more happy with a file rather than a pipe, then it works
> perfectly. It loads as it goes.

Instead of using popen(), why not use QProcess to launch xmame?  This
will allow you to directly read the stdout of the xmame process.  I
don't know if this will behave any better than a pipe, but it's worth a
shot...

-JAC


More information about the mythtv-dev mailing list