Talk:LSL Script Memory

From Second Life Wiki
Revision as of 15:21, 16 February 2013 by Miranda Umino (Talk | contribs)

Jump to: navigation, search

Has anyone tested the new MONO environment for memory usage? It seems its very different from the previous LSO numbers... I think a new section for MONO is needed.--Darwin Recreant 21:21, 4 December 2008 (UTC)

Needed Updates

Using the script below I found a few unusual things happening. One of them seems to be a change in free script memory at the time of compilation. This script provided the data listed below it.<lsl>integer count;

default {

   state_entry()
   {
       llSetTimerEvent(1.0);
   }
   timer()
   {
       llOwnerSay((string)llGetFreeMemory() + " , " + (string)(++count));
       list l = ["", "", "", ""];
       llOwnerSay((string)llGetFreeMemory());
   }
   touch_start(integer detected)
   {
       llResetScript();
   }

}</lsl><lsl>[22:44] EddyFragment Robonaught: Test Begins [22:44] Object: 60664 , 1//Only just recompiled for touch reset. [22:44] Object: 60664 [22:44] Object: 60664 , 2 [22:44] Object: 60628 //Then evens out [22:44] Object: 60628 , 3 [22:44] Object: 60628 [22:44] Object: 60628 , 4 [22:44] Object: 60628 [22:44] Object: 60628 , 5 [22:44] Object: 60628 [22:44] Object: 60628 , 6 [22:44] Object: 60628 [22:44] Object: 60628 , 7 [22:44] Object: 60628 [22:44] Object: 60628 , 8 [22:44] Object: 60628 [22:44] Object: 60628 , 9 [22:44] Object: 60628 [22:44] Object: 60628 , 10 [22:44] Object: 60628 [22:44] Object: 60664 , 1//After a touch reset [22:44] Object: 60628 [22:44] Object: 60628 , 2 [22:44] Object: 60628 [22:44] Object: 60628 , 3 [22:44] Object: 60628 [22:44] Object: 60664 , 1 [22:44] Object: 60628 [22:44] Object: 60628 , 2 [22:44] Object: 60628 [22:44] Object: 60628 , 3 [22:44] Object: 60628 [22:44] Object: 60628 , 4 [22:44] Object: 60628 [22:44] Object: 60664 , 1 [22:44] Object: 60628 [22:44] Object: 60628 , 2 [22:44] Object: 60628 [22:44] Object: 60628 , 3 [22:44] Object: 60628 [22:44] Object: 60664 , 1 [22:44] Object: 60628 [22:44] Object: 60628 , 2 [22:44] Object: 60628 [22:44] Object: 60628 , 3 [22:44] Object: 60628 [22:44] Object: 60628 , 4 [22:44] Object: 60628 [22:44] Object: 60664 , 1 [22:44] Object: 60628 [22:44] Object: 60628 , 2 [22:44] Object: 60628 [22:44] Object: 60664 , 1 [22:44] Object: 60628 [22:45] Object: 60628 , 2 [22:45] Object: 60628 [22:45] Object: 60628 , 3 [22:45] Object: 60628 [22:45] Object: 60628 , 4 [22:45] Object: 60628 [22:45] Object: 60628 , 5 [22:45] Object: 60628 [22:45] Object: 60628 , 6 [22:45] Object: 60628 [22:45] Object: 60628 , 7 [22:45] Object: 60628 [22:45] Object: 60628 , 8 [22:45] Object: 60628 [22:45] Object: 60628 , 9 [22:45] Object: 60628 [22:45] Object: 60628 , 10 [22:45] Object: 60628 [22:45] Object: 60628 , 11 [22:45] Object: 60628 [22:45] Object: 60664 , 1 [22:45] Object: 60628 [22:45] Object: 60628 , 2 [22:45] Object: 60628 [22:45] Object: 60628 , 3 [22:45] Object: 60628 [22:45] Object: 60664 , 1//But this would happen (it seemed to me) after letting the script run a little more before the reset [22:45] Object: 60664 [22:45] Object: 60664 , 2 [22:45] Object: 60664 [22:45] Object: 60664 , 3 [22:45] Object: 60664 [22:45] Object: 60664 , 4 [22:45] Object: 60664 [22:45] Object: 60664 , 5 [22:45] Object: 60628 [22:45] Object: 60628 , 6 [22:45] Object: 60628 [22:45] Object: 60628 , 7 [22:45] Object: 60628 [22:45] Object: 60628 , 8 [22:45] Object: 60628 [22:45] Object: 60664 , 1 [22:45] Object: 60628 [22:45] Object: 60628 , 2 [22:45] Object: 60628 [22:45] Object: 60664 , 1 [22:45] Object: 60628 [22:45] Object: 60628 , 2 [22:45] Object: 60628 [22:45] Object: 60628 , 3 [22:45] Object: 60628 [22:45] Object: 60628 , 4 [22:45] Object: 60628 [22:45] Object: 60628 , 5 [22:45] Object: 60628 [22:45] Object: 60628 , 6 [22:45] Object: 60628 [22:45] Object: 60628 , 7 [22:45] Object: 60628 [22:45] Object: 60628 , 8 [22:45] Object: 60628 [22:45] Object: 60628 , 9 [22:45] Object: 60628 [22:45] Object: 60628 , 10 [22:45] Object: 60628 [22:45] Object: 60628 , 11 [22:45] Object: 60628 [22:45] Object: 60628 , 12 [22:45] Object: 60628 [22:45] Object: 60664 , 1 [22:45] Object: 60628 [22:45] Object: 60628 , 2 [22:45] Object: 60628 [22:45] Object: 60664 , 1//And here again [22:45] Object: 60664 [22:45] Object: 60664 , 2 [22:45] Object: 60664 [22:45] Object: 60664 , 3 [22:45] Object: 60664 [22:45] Object: 60664 , 4 [22:45] Object: 60664 [22:45] Object: 60664 , 5 [22:45] Object: 60628 [22:45] Object: 60628 , 6 [22:45] Object: 60628</lsl> -- Eddy (talk|contribs) 06:01, 2 July 2009 (UTC)

This is interesting. -- Strife (talk|contribs) 18:36, 2 July 2009 (UTC)

Thanks for the confidence boost and I thought so too. If getting inworld is still a problem for you tell me what to run and I'll happily do it for you. Otherwise my tests might be a bit less than useful. Those repeated 60664's are weird though. -- Eddy (talk|contribs) 23:53, 2 July 2009 (UTC)

It seems llGetFreeMemory() does not show true value and is dependent on sim performance (random like) on getting updated. I guess the only way to know true impact of operations and variables can only be tested after many subsequent tries similar to Eddy's method. --Darwin Recreant 08:51, 10 December 2009 (UTC)

I'd say the above observations were due the the random involvement of garbage collection. If you do an llSleep(2.0) or so before accessing llGetFreeMemory() you'll give garbage collection a good chance to get in, and results will be more consistent. But running this code in December 2012 did not show variation for me. So I'd guess this is an obsolete observation and this page can be revised down in size? Omei Qunhua 17:27, 28 December 2012 (PST)

List Storage Requirements (Mono) need updating

It appears that the storage requirements for lists in Mono have changed since this page was written. I plan to change the figures to those experienced in December 2012 as shown on my user page, unless anyone disagrees. Omei Qunhua 17:27, 28 December 2012 (PST)

I would almost be inclined to suggest rewriting the article from scratch. It's an old article which had Mono info bolted one after the fact. -- Strife (talk|contribs) 21:13, 28 December 2012 (PST)


The article talks about datas collected by llGetFreemomry and not llGetUsedMemory . Are the samples collected recently using always this old function ? Shouldn t have we some datas collected by llGetUsedMemory ? -- Miranda Umino 14:21, 16 February 2013 (PST)