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

List:       xerces-j-dev
Subject:    Re: IndexOutOfBoundsException within adoptNode
From:       Chad La Joie <lajoie () itumi ! biz>
Date:       2010-06-02 18:59:30
Message-ID: 4C06AA12.8010800 () itumi ! biz
[Download RAW message or body]

Excellent, thanks for the tips and the bug fix.

On 6/2/10 2:52 PM, Michael Glavassevich wrote:
> Hi Chad,
>
> Chad La Joie <lajoie@itumi.biz> wrote on 06/02/2010 01:59:11 PM:
>
>  > Thanks Michael,
>  >
>  > Somewhat related to this, I note that the feature 'defer-node-expansion'
>  > can not be set to false when the default document factory is used[1].
>
> That's the Xerces-J 1.x documentation. The behaviour of the feature in
> Xerces-J 2.x is documented here [2]. It's default is true but you can
> set its value to false if you want to.
>
>  > I understand why a person might want to defer node expansion but in
> all of
>  > my cases, I have to traverse every node. I am wondering, does having a
>  > deferred node decrease performance, especially over larger documents,
>  > when you're going to be hitting every node?
>
> If you traverse every node then I would expect it to cost more than if
> they were constructed eagerly by the parser. More details on the
> performance implications of this feature are in an article [3] I
> co-wrote some time ago.
>
>  > If so, might it be possible to allow adjusting the defer-node-expansion
>  > feature even when the default factory is used?
>
> Try setting the feature to false on the DocumentBuilder.
>
>  > [1] http://xerces.apache.org/xerces-j/features.html#defer-node-expansion
>
> Thanks.
>
> [2]
> http://xerces.apache.org/xerces2-j/features.html#dom.defer-node-expansion
> [3] http://www.ibm.com/developerworks/library/x-perfap2.html/#N100CB
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>

-- 
Chad La Joie
http://itumi.biz
trusted identities, delivered

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org

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

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