axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <>
Subject Re: [Axis2] OM - Traversal of children from parent
Date Thu, 30 Sep 2004 04:22:40 GMT
Eran Chinthaka wrote:

> Hi,
> I looked at the OM implementations in the scratch area.
> In all those implementations, we have tried to achieve two things, 
> which are contradictory, at the same time. Namely; reducing the memory 
> foot print and improve performance. But we could achieve both 
> objectives to some extent, successfully.
> We have achieved the memory foot print reduction mainly through 
> deferred parsing.
> In the document traversal design, in all those designs, we have given 
> a reference of the first child to the parent. If a parent needs to get 
> some info about his 5^th child (say), parent has to first get its 
> first child and through that getNextSibling has to be called four more 
> times. Here we are accessing four irrelevant objects to go for the 
> fifth one.
> But if we can have a Collection like Vector in the parent, which keeps 
> “references” to its children, the earlier use case must have been more 
> efficient. The vector is such that its 5^th object is a reference to 
> the fifth child (if already being parsed).
> The only drawback I see in this proposal is the increment of memory 
> foot print, to store those references to children. But think about the 
> performance improvement one can gain. For example if one tries to 
> access the 900^th element, he just have to access just one object 
> compared to 899 useless object accesses required, if this references 
> are not in place.
> One of the main concerns of Axis 2 is to facilitate Axis engine to 
> handle big soap messages and to improve the performance. So I think 
> this would give some more performance, at the cost of memory usage.
> Note : I can not compare the performance improvement that can be 
> gained from the above proposal through Sosnoski’s XML Bench as it has 
> tested sequential node traversal only. The above proposal is for 
> non-sequential access.
> Please comment.
maybe we shoudl extend Sosnoski’s XML Bench and add test that is 
specific for this?



The best way to predict the future is to invent it - Alan Kay

View raw message