How to request data from a lazily-created tree structure ?

Diez B. Roggisch deets at nospam.web.de
Tue Jun 17 03:08:58 EDT 2008


> 
> Yes, I need to make sure my requests are properly written so that the
> generic XPath engine does not need all the structure in memory.
> 
> There are quite a few cases where you really don't need to load
> everything at all. /a/b/*/c/d is an example. But even with an example
> like /x/z[last()]/t, you don't need to load everything under the
> every /x/z nodes. You just need to check for the latest one, and make
> sure there is a t node under it.
> 
> Anyway, if I need to make requests that need all the data... that
> means that the need for lazy instantiation of nodes disappears,
> right ?


Yes. And unless you have memory-constraints I have to admit that I 
really doubt that the parsing overhead isn't by far exceeded by the 
network latency.

Diez



More information about the Python-list mailing list