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

List:       koffice-devel
Subject:    Re: Faster saving
From:       David Faure <faure () kde ! org>
Date:       2004-04-14 13:44:11
Message-ID: 200404141544.12117.faure () kde ! org
[Download RAW message or body]

On Wednesday 14 April 2004 15:36, Thomas Zander wrote:
> On Wednesday 14 April 2004 12:33, Nicolas Goutte wrote:
> > DOM is not a standard parser. Standard parser like SAX or expat, do it from
> > top to bottom. You cannot go back, you cannot go forward.
> >
> > Also what you mean in your example can only be retrieved with DOM's
> > namedItem. But that means that you browse the children everytime to get one
> > child.
> 
> I must be spoiled too much then; the parser I use has a DOM interface, is 
> lightlning fast and has all these features you say are not default.
> I assumed the world has changed fast enough to expect a non trivial 
> application (which a WP is) to have a mature XML parser.

You don't understand. Sure, DOM is "mature".
But it also requires to have the entire document in memory at once.
If you have reasonable size documents, DOM is really great.
But if you're thinking about a 1000-pages document with 10000 paragraph tags
and a huge number of styles associated with them, holding all of that
in memory as a DOM document *plus* the application's own data structures
for those paragraphs and styles, can really eat all the available memory.

Well, we're still doing this on loading because it's convenient :)
But on saving maybe we can avoid using a huge amount of memory again
(and making the machine swap on every autosave...)

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.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