xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miroslaw Dobrzanski-Neumann <...@mosaic-ag.com>
Subject Re: DOM Performance
Date Thu, 01 Feb 2001 08:19:02 GMT
On Wed, Jan 31, 2001 at 11:20:01AM -0800, Andy Heninger wrote:
> DOM Performance Problems
> ========================
> Here are some thoughts on what might be done:
> o  Associate all of the storage for a DOM document with the document
>    node object.  Applications would get document from the parser,
>    access it, and then explicitly delete it when done.  All Nodes and
>    strings would remain until the document was deleted.

For a long time we (my company) had the similar memory problems. So we had
analysed how the memory is used in our code. It turned out that we needed some
kind of write once + random read optimization and taht the memory was bound to
some higher level object. Our solution was to use an allocator bound to the
object. It preallocates a big block and distributes it according to the
requests. The is reuse inside of the block. The whole block will be freed when
the object dies. The implementation of such allocator is very simply and fast.

This solution could also be applicable for DOM. In most cases the DOM Document
is build in a stright forward process with nearly no deletion or
modifications. Also write once, random read, free when the last node dies

Send bugreports, fixes, enhancements, t-shirts, money, beer & pizza to
Miroslaw Dobrzanski-Neumann

Abteilung Basisentwicklung und Forschung
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne@mosaic-ag.com

View raw message