[Kst] QTextStream to QDomElement
Andrew Walker
arwalker at sumusltd.com
Fri Jan 14 21:41:33 CET 2005
Here are the times for the XML versus QTextStream
for saving a 500kB file. All values in seconds.
XML (to disk)
1.29, 1.28, 1.30
QTextStream (to disk)
1.10, 1.11, 1.12
XML (to memory)
0.39, 0.39, 0.41
QTextStream (to memory)
0.19, 0.17, 0.18
Andrew
On Friday 14 January 2005 10:50, George Staikos wrote:
> On Friday 14 January 2005 13:41, Andrew Walker wrote:
> > Probably the best argument against it. However, it does
> > have the benefit of enforcing good practices. If we
> > had used QDomElement from the beginning it would
> > have given people a good reason to do this:
> >
> > <plot x=2 y=4... / >
>
> <plot x="2" y="4"/> You have to quote attributes.
>
> > instead of
> >
> > <plot>
> > <x>2<x/>
> > <y>2<y/>
> > .
> > .
> > .
> > <plot/>
>
> I guess you mean </x> </y> etc
>
> You can do this with QDom too. Yes they should be attributes, but it
> wasn't done that way originally. There is value in changing some nodes to
> be attributes instead, and this can easily be done now, but we have to keep
> backwards compatibility, and then modern Kst files won't be readable by
> older Ksts. That's why none of this was changed, but new nodes follow this
> design (I think - I tried to do that anyway).
>
> > The kst files would all be half the size they are now. If we're
> > routinely posting 300kB kst files to ELOG then I would argue
> > that this matters.
>
> But has nothing to do with requirement to use QDom.
More information about the Kst
mailing list