[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: design discusion: using QtXmlStreamReader instead of KoXmlReader
From:       Björn_Breitmeyer <bjoern.breitmeyer () kdab ! com>
Date:       2010-08-10 11:52:04
Message-ID: 4C613D64.40709 () kdab ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


 From my experience with QXmlStreamReader you have one fundamental 
difference in comparison to KoXmlReader. QXmlStreamReader is really
a stream, this means you cant go back. This leads to the problem
that any function can disrupt the whole loading process if it reads
too much or not enough data.

Am 10.08.2010 13:34, schrieb Boudewijn Rempt:
> On Tuesday 10 August 2010, Jos van den Oever wrote:
> > Hi all,
> > 
> > In Qt 4.3, QtXmlStreamReader was introduced. It is an XML Pull Parser (XPP),
> > which is a type of parser that makes it easier to do piecemeal parsing of an
> > incoming stream.
> > 
> > It is faster than QtXmlReader and might let us use less KoXmlElements which
> > would save memory while parsing.
> > 
> > I'm looking into doing this conversion, probably by first removing all use of
> > QtXmlReader and then looking replacing calls like these
> > loadOdf(const KoXmlElement&element)
> > with
> > loadOdf(QtXmlStreamReader&  reader)
> > where the reader is positioned at the start of an element.
> > 
> > This is a huge task and I'd like to not endeavor on it without helpful hints,
> > so if you have warnings, good advice,  or comforting words, I'd like to hear
> > them now.
> > 
> 
> I'm very interested in seeing the results, since KoXMLReader is very much optimized \
> for limiting memory consumption. If you lead the way, I'll help out after I've \
> finished my current task. 
> (And though I think KoXmlReader is _very_ impressive, I think it will be good for \
> maintainability if we can drop it. It's very hairy code full of warnings for the \
> unaware.) 


-- 
Björn Breitmeyer | bjoern.breitmeyer@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions


["smime.p7s" (application/pkcs7-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic