[mythtv] [PATCH] mythgame xml reading

Isaac Richards ijr at po.cwru.edu
Mon Sep 6 23:45:33 EDT 2004


On Sunday 05 September 2004 02:40 pm, Charlie Brej 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.
>
> I'm not sure what to do. Both options have their flaws. My systems (240Mb)
> starts grinding once you have 200Mb mythtv + 50Mb xmame ...
> An option would be to dump the xml output to a temp file and read that
> while giving warning to the user that the frontend will stop responding for
> a few secs.
>
> Thoughts?

I'd suggest try to use QProcess to spawn the apps, instead of popen, but in 
the meantime, I'm going to apply your internal parsing patch..

Isaac


More information about the mythtv-dev mailing list