From: Wolfgang M. <wol...@ex...> - 2010-09-08 16:45:11
|
> I then want to pass $collection around to one or more functions for further > querying. Now, $collection could represent 100s of documents so I was > wondering whether it's wise to pass it as a function argument, or should I > do the initial type selection within each function. Passing $collection as a node set will be faster than regenerating the set in every function you call. Since calls to collection() are rather expensive, creating the initial node set only once makes sense. Internally eXist only passes node references through the function call, not the actual nodes or documents. Wolfgang |