Subject:Document loading and unloading Author:Steven Fancher Date:11 Jan 2007 05:24 PM
Here is a general question:
When does a document referenced by doc(...) get unloaded from memory?
I'm processing a bunch (>5000) small XML files and I keep blowing the stack.
Does anyone know if there is a rule about this? Is it completely implementation dependent? Should it be when the variable bound to the doc() goes out of scope?
Subject:Re: Document loading and unloading Author:(Deleted User) Date:12 Jan 2007 03:10 AM
Hi Steven,
as you guessed, it's implementation-dependent; however, the
requirement that every call to doc() must be "stable" (i.e. when
given the same argument, it must return the exact same node tree,
with the same identity) almost forces every implementation to keep
all of them in memory until processing ends.