xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Shraibman <...@selectacast.net>
Subject Re: DOM size
Date Wed, 24 May 2000 00:24:55 GMT
Joseph Shraibman wrote:

> OK I downloaded a trial version of OptimizeIt and am attaching the
> output.  It looks like
> there are a lot of ints allocated.
>
The problem is that instead of DocumentImpl the parser was using
DeferedDocumentImpl, which has many int arrays (see below).

The answer is to do
parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion",
false) before you parse anything. Thanks to David Sobeck for pointing
this out to me.

================begin code from DeferredDocumentImpl=============
   /** Node count. */
    protected transient int fNodeCount = 0;

    /** Node types. */
    protected transient int fNodeType[][];

    /** Node names. */
    protected transient int fNodeName[][];

    /** Node values. */
    protected transient int fNodeValue[][];

    /** Node parents. */
    protected transient int fNodeParent[][];

    /** Node first children. */
    protected transient int fNodeLastChild[][];

    /** Node prev siblings. */
    protected transient int fNodePrevSib[][];

    /** Identifier count. */
    protected transient int fIdCount;

    /** Identifier name indexes. */
    protected transient int fIdName[];

    /** Identifier element indexes. */
    protected transient int fIdElement[];


Mime
View raw message