From koffice-devel Fri Apr 16 05:07:08 2004 From: Werner Trobin Date: Fri, 16 Apr 2004 05:07:08 +0000 To: koffice-devel Subject: Re: Faster saving - new data Message-Id: <200404160707.08118.trobin () kde ! org> X-MARC-Message: https://marc.info/?l=koffice-devel&m=108209207208791 On Thursday 15 April 2004 21:41, David Faure wrote: [...] > The first three are the usual QDom-based ones (which have the problem > of the memory consumption): > streaming QDomDocument (utf8): 374 + 3219 = 3593 > saving QDomDocument to stream (utf8): 374 + 3228 = 3602 > QDomDocument::toCString (utf8): 374 + 2230 = 2604 > > Then comes > writing XML by hand via QTextStream (utf8): 4180 > which is not only the slowest (*), but also a high risk of syntax errors. > > And finally, the new one is the TagWriter class that I wrote, which writes > raw XML directly to the file (no QTextStream involved), but offers a high-level > API (startElement, setAttribute, endElement) > writing XML using TagWriter (utf8): 381 > > I think this is an impressive result! Wow! That's really impressive. And it's not that much code either. Thanks for testing that :-) Ciao, Werner _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org https://mail.kde.org/mailman/listinfo/koffice-devel