[mythtv] [PATCH] mythgame xml reading

Charlie Brej brejc8 at vu.a.la
Sun Sep 5 14:40:58 EDT 2004


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?

BTW. If anyone wants to have a hack at the SAX version I can send the patch.

-- 
         Charlie Brej
APT Group, Dept. Computer Science, University of Manchester
Web: http://www.cs.man.ac.uk/~brejc8/ Tel: +44 161 275 6844
Mail: IT302, Manchester University, Manchester, M13 9PL, UK


More information about the mythtv-dev mailing list