How to check attached scripts for Lag ?
|
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
03-08-2009 00:10
Hello;
I have created a speed controll script which allows me to walk from very slowly to extremely fast. The script uses collision detection to keep myself "on ground" when i walk over a build like a bridge or in a skybox...
Now i am afraid, that the script may cause lag to others nearby and/or the SIM on which i am using it. But i have no idea, how i could measure how many resources are consumed. I have the estate manager permission so i could probably use the estate tools somehow ? Or is there a "guide for lagfree scripting" around ? Or maybe there is a funtion library available, which i can include into my controller for monitoring its performance ? Would it be a good idea to enable mono ?
thanks for any hint...
|
|
Alisha Matova
Too Old; Do Not Want!
Join date: 8 Mar 2007
Posts: 583
|
03-08-2009 07:55
You can measure AV script load using top scripts in the estate controls. Just sit on a recognizably named prim. Refresh top scripts and search for that prims script load. That will tell you what your AV idles at, not sure if you can accurately test you script in action though. Since you have to be sitting to make this trick work.
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
03-09-2009 12:19
The 1.26 server version LL will be releasing sometime in the future will bring the ability to see avatar script time. But for now, Alisha's comment is correct. I wish I knew when 1.26 was coming, but I don't.
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
03-09-2009 13:45
Keep in mind that it'll include all your attachments. I recommend:
rez a box create a new script in contents and save it sit & measure your load -- it should be very small add your attachment measure your load
Unfortunately, your particular script may not work well when you're sitting. You'll have to use your judgement to decide whether it does the same amount of work in this case (even though it may have little observable effect).
I have a little object you can set out or wear, which measures LM latency, which is a roundabout way of measuring the script load on a sim. I'll drop one on you next time I'm ingame. However, this should budge only if your script is particularly hoggy. You might be able to see an effect if you wear your device at every attachment point, though. The numbers from that script are very straightforward: how long it takes to receive an LM it sends, in milliseconds. It's almost identically, how long the script is being lagged by all other scripts.
The way mentioned earlier is far better, if it works, because it focuses on how much time YOUR script is using. Unfortunately, it's just one sample rather than an average. You may need a friend to use your device and hold down arrow keys while you take your measurements. I sure wish they'd improve this!
|
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
03-09-2009 15:46
Hi, all! Thank you for your suggestions. I will try them out as good as i can. I am only afraid, that in my particular case, it is of no use to measure script performance while i am sitting, because the script gets to work only, while i am walking over prims . What i have allready seen, is that the collision detect events come in very frequently (several per second) and with each event i am calculating into which direction my avatar must move, and by which speed, in order to keep a smooth walking. And this looks VERY performance consuming to me, but as i said before i have no clue at all, how much the script effectively consumes... Is it correct, that attached scripts will affet the SIM performance and thus should be seen by the estate tools ? So if my script creates high load while walking, i should see this in the estate tools ... Maybe i could work with some delta measurement ... Do you know if it is possible to gather performance statistics over time somehow ? Can i read statistical data via LSL ? or maybe using libSL ? If that is possible maybe there are libSL based tools available... hmm... i have to google that one too  thanks again for your valuable input so far!!!
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
03-10-2009 09:00
From: Gaia Clary ...Is it correct, that attached scripts will affet the SIM performance and thus should be seen by the estate tools ? So if my script creates high load while walking, i should see this in the estate tools ... Maybe i could work with some delta measurement ... You won't see anything in Estate Tools (top scripts). You would see an effect in sim stats (control-shift-1, IIRC): you'd see "events per second" change, and possibly other stats. Not sure what other tools you could use. If you can find a sim with very little activity, try my lag detector (sorry, haven't been in yet, but will deliver) and then have a bunch of friends walk around with your widget attached and see what happens. That may not measure all the kinds of lag that your script will cause, but it'll give you a good indication of the impact of your script on other scripts. BTW, you can wear my lag detector. Interestingly, the measured lag is substantially higher when it's worn. I don't know the precise cause, though no doubt delivering LMs is more complicated in that case.
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
03-11-2009 12:14
From: Lear Cale You won't see anything in Estate Tools (top scripts). You would see an effect in sim stats (control-shift-1, IIRC): you'd see "events per second" change, and possibly other stats. Actually yes, you will see this in Top Scripts for Estate tools, as long as the item you are sitting on has at least one active script (something with a listen is ideal). You can get a baseline reading for the object before sitting, after sitting, with and without attachments, etc. I provide this service for fellow creators all the time in my private sim. 
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
03-11-2009 14:01
From: Darien Caldwell Actually yes, you will see this in Top Scripts for Estate tools, as long as the item you are sitting on has at least one active script (something with a listen is ideal). You can get a baseline reading for the object before sitting, after sitting, with and without attachments, etc. I provide this service for fellow creators all the time in my private sim.  Actually no, since she was (I believe) asking about the case where she's not sitting. At least, that's what my reply was about. Note her next sentence about walking: you can't walk while sitting.
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
03-12-2009 13:00
Ah I see now, My mistake  I thought you were saying it couldn't be seen at all.
|