What this feature "http://apache.org/xml/features/dom/defer-node-expansion" does?
i have read about this feature. But was really unable to understand what will happen if this is set to false.
Can anyone come up elaborately on this as i don't find any other link that explain to the ability i understand.
by deferred node expansion, basically, a lot of objects/strings are not created/allocated until you navigate to the corresponding node position... it makes dom parsing a bit faster but tree traversal slower ...
the initial memory consumption is lower than a full-expanded DOM tree, but after traversal, the memory usage could easily be a lot higher than a full-expanded DOM tree... beware of the catch
it is a form lazy loading: DOM nodes are created as you traverse tree.
This is a common design pattern, it is widely used. For example Hibernate calls it Lazy Fetching.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With