Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 821

Talking LiveCode • Get the size of (part of) an array in memory?

$
0
0
Hi, all

I know one can get the length of an arrayEncoded array. But I wonder how to get the size in memory of an arrayDecoded array. My preOpenStack handler contains

CODE:

global stackDataput arrayDecode(URL anURL) into stackData -- previously encoded array data
My data in memory is now a tree that's 5 levels deep which is OK. It happens the disk file is 5,4Mo, which seems an awful lot. I want to find what's wrong with the data in the array. The debugger keeps displaying empty windows whenever I try to display the last level of data.
Is that normal?

I want to locate the part of the tree that I suspect is bloated. I can do

CODE:

global stackDataanswer len(arrayEncode(stackData))
but not knowing HOW the data is encoded, this is not really informative. I would like to do something like

CODE:

global stackDataanswer size(stackData) -- gives an erroranswer len(stackData) -- returns 0answer len(stackData[subtreeLevel1]…etc) -- returns 0
Any way to do this?

Statistics: Posted by Fjord — Fri Dec 06, 2024 6:42 pm



Viewing all articles
Browse latest Browse all 821

Trending Articles