[Kst] QTextStream to QDomElement

Barth Netterfield netterfield at astro.utoronto.ca
Fri Jan 14 19:34:04 CET 2005


How about if we don't do it because it just doesn't matter?


On January 14, 2005 01:25 pm, Andrew Walker wrote:
> Okay, so this demonstrates that the Qt implementation of XML
> is very slow compared to other implementations. It doesn't say
> anything about how QDomElement compares to QTextStream
> speed-wise though. Is it possible that QTextStream is just as bad?
>
> Andrew
>
> On Friday 14 January 2005 10:15, George Staikos wrote:
> > On Friday 14 January 2005 12:56, Andrew Walker wrote:
> > > The first may be true. Have you actually measured this for the
> > > kind of files we are saving? The second point I disagree with.
> > > We should not have to be worrying about indentation,
> > > endl, closing tags, delimiters, etc that QTextStream compels
> > > us to. I'll reserve judgment on your third point.
> >
> >    QDom is known to be very slow.
> > http://xmlbench.sourceforge.net/results/benchmark200402/index.html
> > I also saw some slides about this at a talk.
> >
> >    We are definitely dealing with big DOM documents too.  The ones in
> > Paris were around 300kb (just the XML!!), and Nicolas uses .kst files
> > even bigger than that.
> >
> >     There are future cases where we will also need to extract fragments
> > of the DOM as text, so we will be even more wasteful there, creating a
> > complicated heavyweight structure only to convert back to text, and then
> > back to DOM again.
> >
> >     Finally, write out an example both ways and you'll see that it's much
> > more tedious to write with QDom.  The indentation stuff is not necessary,
> > but it was very easy to sneak in and makes it easier to deal with those
> > files for debugging.
> >
> >    QDom is certainly more elegant than QTextStream, but it's not "ready"
> > yet.
> >
> >    Note: QDom4 will be much faster than libxml even, apparently, so it
> > might change things a bit.  That's probably 1.5-2 years into Kst's future
> > though.
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst


More information about the Kst mailing list