Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What's MONO Good For? What's MONO Bad For?

Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-30-2008 13:17
From: Cynebald Ceawlin
the "Mono time" column was still showing 0.000. My assumption is that the "top scripts" listing isn't quite handling things right just yet...

I'm wondering indeed exactly what "mono time" is and why it is uniformly zeroes. I'm hoping (faintly) that you are right that the estate tools aren't showing correct values somehow.

I also noticeed that the top script list no longer reports the object locations which is a big PITA.
_____________________
http://slurl.com/secondlife/Together
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
08-30-2008 13:18
From: RobbyRacoon Olmstead
So far the Mono rollout has been the single biggest disaster I've ever faced as a content creator, and we (the Combat Samurai Island team) now have more than nineteen thousand customers with horribly broken content.


From: Babbage Linden
Because Mono has been integrated in to Second Life alongside the original scripting engine, scripters are able to opt in to Mono. Unless scripts are explicitly converted to run on Mono they will continue to run on the existing scripting engine. There is no automated conversion to Mono and all existing scripted content will continue to run on the original scripting engine as before.
I took this to mean that unless you specifically choose to 'opt in' then nothing changes. Is this not the case?
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-30-2008 13:38
From: RobbyRacoon Olmstead
So far the Mono rollout has been the single biggest disaster I've ever faced as a content creator, and we (the Combat Samurai Island team) now have more than nineteen thousand customers with horribly broken content.

Robby -- this is an obvious and nasty bug related to state_exit handling --- see (and vote on)...

http://jira.secondlife.com/browse/SVC-2958

...it affects LSL compiled scripts
_____________________
http://slurl.com/secondlife/Together
Cynebald Ceawlin
Scripting the night away
Join date: 15 Apr 2007
Posts: 30
08-30-2008 14:15
From: Escort DeFarge
I also noticeed that the top script list no longer reports the object locations which is a big PITA.


yeah that -- I'm not sure how, but I failed to notice that column was blank. :o Big PITA is a bit of an understatement.... time to go nosing about in the JIRA.

I'm also encountering an inability to scroll in the all-search pages... I think I've heard of people having problems w/ that in the current released viewer, but I hadn't seen it before. Not to mention some less-than-stable behavior. This *IS* a brand-spanking new RC... I have faith it will get better before it hits the streets as an official release. :D Like I said, I'm off to actually read the release notes for the RC and start perusing the JIRA...
_____________________
-----
Cynebald Ceawlin
Proprietor and Chief Scripter
The Mathom House:: Scripted Objects and What-Not
Nimue Isle (SLURL: http://slurl.com/secondlife/Nimue%20Isle/164/119/28)
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-30-2008 14:37
From: Cynebald Ceawlin
Like I said, I'm off to actually read the release notes for the RC and start perusing the JIRA...

While you are in Jira - vote for this one ;)
http://jira.secondlife.com/browse/SVC-2967
_____________________
http://slurl.com/secondlife/Together
Cynebald Ceawlin
Scripting the night away
Join date: 15 Apr 2007
Posts: 30
08-30-2008 14:46
See JIRA issue VWR-8606 (http://jira.secondlife.com/browse/VWR-8606).
_____________________
-----
Cynebald Ceawlin
Proprietor and Chief Scripter
The Mathom House:: Scripted Objects and What-Not
Nimue Isle (SLURL: http://slurl.com/secondlife/Nimue%20Isle/164/119/28)
Tegg Bode
FrootLoop Roo Overlord
Join date: 12 Jan 2007
Posts: 5,707
08-30-2008 14:48
From: Damanios Thetan
Just crashed my sim, but works fine...

Havok 1 used to crash sims and work "fine" too :)
_____________________
Level 38 Builder [Roo Clan]

Free Waterside & Roadside Vehicle Rez Platform, Desire (88, 17, 107)

Avatars & Roadside Seaview shops and vendorspace for rent, $2.00/prim/week, Desire (175,48,107)
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
08-30-2008 22:21
In general, you should compile your scripts to mono, because it will end up using less memory on the server.

With old LSL compiler, every script takes 16K of memory.

With Mono, ever copy of the same script (same asset UUID) shares the same code page, and gets memory allocated to it as it's needed.

So, unless you have a specific reason not to compile to Mono, you should use Mono by default.
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
08-30-2008 23:24
From: Lear Cale
So, unless you have a specific reason not to compile to Mono, you should use Mono by default.

Hey! If you do this, please note your simulator script time in ctrl-shit-1 before and after doing the recompilation of your scripts. I'd be fascinated to know the results of taking an LSL sim and recompiling alll scripts to Mono.

/esc
_____________________
http://slurl.com/secondlife/Together
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
08-31-2008 04:59
From: Lear Cale
In general, you should compile your scripts to mono, because it will end up using less memory on the server.

With old LSL compiler, every script takes 16K of memory.

I'm not sure this is actually true anymore, iirc LSO-LSL scripts now scale memory as well. There are several changes which were made to LSO-LSL despite assurances that it would remain unchanged, including some weird throttling of states:
http://jira.secondlife.com/browse/SVC-2750
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Catten Carter
Registered User
Join date: 22 Jul 2007
Posts: 24
08-31-2008 05:40
Did a few more to test function execution speed

// Speed of Frand execution (5 runs)
default
{
touch_start(integer total_number)
{
float time = 0.0;
float _time = 0.0;
integer i = 0;
float random = 0.0;

for(i = 0; i < 1000; ++i)
{
_time = llGetTime();
random = llFrand(30.0)+30.0;
time += llGetTime()-_time;
}

time = time/1000.0;
llOwnerSay("LSL: "+(string)time);
}
}

[5:21] Object: Mono: 0.000178
[5:21] Object: Mono: 0.000042
[5:21] Object: Mono: 0.000070
[5:21] Object: Mono: 0.000025
[5:22] Object: Mono: 0.000067

[5:23] Object: LSL: 0.001349
[5:23] Object: LSL: 0.001198
[5:23] Object: LSL: 0.001373
[5:23] Object: LSL: 0.001284
[5:23] Object: LSL: 0.001207


// Same test with llGetLocalPos()

[5:27] Object: Mono: 0.000144
[5:27] Object: Mono: 0.000134
[5:27] Object: Mono: 0.000091
[5:28] Object: Mono: 0.000068
[5:28] Object: Mono: 0.000098

[5:26] Object: LSL: 0.001192
[5:26] Object: LSL: 0.000981
[5:26] Object: LSL: 0.000977
[5:26] Object: LSL: 0.000967
[5:26] Object: LSL: 0.001266

// Same test with llListFindList()

[5:37] Object: Mono: 0.001687
[5:37] Object: Mono: 0.001574
[5:37] Object: Mono: 0.001649
[5:37] Object: Mono: 0.001510
[5:37] Object: Mono: 0.001597

[5:38] Object: LSL: 0.003307
[5:38] Object: LSL: 0.003155
[5:38] Object: LSL: 0.002780
[5:38] Object: LSL: 0.002584
[5:38] Object: LSL: 0.002872

Looks great, so I do hope that the estate tools are off
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
09-02-2008 07:10
wow.

great, thanks guys. :) im getting the feeling, though, that we don't know what it's good/bad for yet, until all the kinks are worked out.


so... let me get this straight. from a simple kindergarten-level scripter here...

scripts with timers-- still take up script time and still cause lag with mono. and shorter timer times lag more. right?

listeners-- still parse input and cause lag with mono, same as always. no?

setpos/rot/parms-- still throttled to delay 0.2 seconds every time you do this. yep.


these are the main things i work with. and yeah, the detect the spot that got touched function is really cool. but i was told that it only works if people clicking the thing have a mono-enabled client. which, btw, not everybody has yet. ;P
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
09-02-2008 10:39
From: Bloodsong Termagant
scripts with timers-- still take up script time and still cause lag with mono. and shorter timer times lag more. right?
Right, but when used reasonably aren't a big problem, even less of a problem compiled to Mono because the Mono handler will run faster.

From: someone
listeners-- still parse input and cause lag with mono, same as always. no?
Same as always, but with less of a penalty for having the *script* parse the input rather than letting the sim do it (by restrincting, e.g., owner-only, in llListen() call). Still a good idea to restrict appropriately!

From: someone
setpos/rot/parms-- still throttled to delay 0.2 seconds every time you do this. yep.
All delays still apply. Furthermore, it's a good idea to avoid trying to get around these delays. Things that are delayed are delayed *because* they cause lag; they're delayed to discourage you from overdoing them. When coding tricks to avoid delays, be sure that it happens rarely!
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
09-02-2008 10:45
From: Haravikk Mistral
From: Lear Cale
In general, you should compile your scripts to mono, because it will end up using less memory on the server.
With old LSL compiler, every script takes 16K of memory.
I'm not sure this is actually true anymore, iirc LSO-LSL scripts now scale memory as well.


Just to clarify, the first part would still be true (it can end up using less memory on the server) even if the second part is false (every LSL-compiled script takes 16K of memory), because of code segment sharing for Mono-compiled scripts.

I'd be surprised but happy to learn that dynamic memory allocation was retrofitted to LSL-compiled code. Please let us know if you can point to any authoratitive info on it.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
09-02-2008 11:23
From: Lear Cale
Just to clarify, the first part would still be true (it can end up using less memory on the server) even if the second part is false (every LSL-compiled script takes 16K of memory), because of code segment sharing for Mono-compiled scripts.

Right. And I'd be willing to bet that most scripts out there use less than 4kB of memory (how many do we have just to set a simple particle effect, float text, animated texture, convert a chat message into a link message, etc.?), so even if the amount of memory they use is worst-case multiplied by four, I suspect sims are likely to save memory on average (if x<4kB then 4x<16kB).
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
09-02-2008 12:59
Mono is OK to play with for personal use, but it is not ready for objects to be sent out into the wild, unless the scripts are open so that end users can recompile after the runtime blows up.

http://jira.secondlife.com/browse/SVC-2908
1 2