I use the following code to loop trough all globals :
set name=""
for
{
set name=$order(^$GLOBAL(name))
quit:name=""
write name,!
}
However this is really slow : about 1second per node.
I ran debugger, and it seems most of the time is spend in "%SYS.GD Visible" function. There is a comment that says :
"Sees if globals in dataset are visible to our namespace"
This function loop on a global named ^mtemp which contains lot of records (10K or more).
I have cleared global, hoping it has been filled by another process but it's not (it seems to be filled by %SYS.GD)
Why is it so slow, Is there a way to make this faster ?