XML & memory use/release

Martin Blackman martinblackman at gmail.com
Wed Jan 24 07:21:12 EST 2007


Dear listfolks,

I've noticed that creating an xml tree from a file using
'revcreatexmltree' can take up anything from 15 to 30 times the size
of the file on disk in memory.  Does that sound like Rev is doing
anything peculiar to those with more understanding of the underlying
behaviour ?

I need to deal with some reasonably large files and so need to
consider ways to avoid changing the user's computer into treacle. (
I've been able to grind my 512MB laptop practically to standstill but
my desktop seems to manage OK even when its physical memory available
is very low)

I've had a look at the 'hasmemory' function but the docs say not to
trust it !  It works to some extent , but seems to play it safe by
returning false if you want more than about 2/3 of the available
physical memory.

The other thing I've found is that revdeleteXMLltree does not seem to
free up any memory, at least looking at the Windows Task manager
'physical memory available' and 'commit charge'. This looks to be
worth a Bugzilla entry to me but I'm outside my knowledge zone here.

At this stage it looks like I should check the hasmemory and then
split up the xml file if need be, but I could still run into problems
thanks to the above memory-releasing problem.  Or maybe my laptop is
just problematic...
Any thoughts ?
Many thanks
Martin Blackman



More information about the use-livecode mailing list