Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Finding Lag Scipts?

Shayna Korobase
Registered User
Join date: 8 May 2007
Posts: 454
07-10-2008 09:28
Is there a tool that you can use to pinpojnt troublesom scripts in your sim? If so... what, where, how does it work?

Thanks :-)
3Ring Binder
always smile
Join date: 8 Mar 2007
Posts: 15,028
07-10-2008 09:29
OOH! yes. please someone answer this!
_____________________
it was fun while it lasted.
http://2lf.informe.com/
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
07-10-2008 09:30
From: Shayna Korobase
Is there a tool that you can use to pinpojnt troublesom scripts in your sim? If so... what, where, how does it work?

Thanks :-)

ohhh! if it exists, I can answer how it works, it pinpoints troublesome scripts in your sim!
_____________________
3Ring Binder
always smile
Join date: 8 Mar 2007
Posts: 15,028
07-10-2008 09:33
From: Dekka Raymaker
ohhh! if it exists, I can answer how it works, it pinpoints troublesome scripts in your sim!

you're so helpful. :cool:
_____________________
it was fun while it lasted.
http://2lf.informe.com/
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
07-10-2008 09:34
If you actually OWN the sim, you can use World -> Region/Estate -> Debug -> Show Top Scripts, which will show which scripts in the sim are causing the most lag, and you can highlight them (or the objects that contain them) with the Beacon if you want.

Unfortunately, if you don't own the sim as a private island, there's no way to do this.
Shayna Korobase
Registered User
Join date: 8 May 2007
Posts: 454
07-10-2008 09:35
From: Yumi Murakami
If you actually OWN the sim, you can use World -> Region/Estate -> Debug -> Show Top Scripts, which will show which scripts in the sim are causing the most lag, and you can highlight them (or the objects that contain them) with the Beacon if you want.

Unfortunately, if you don't own the sim as a private island, there's no way to do this.


Thank you very much. yes I own the sim and will try that. :-)
Daniel Regenbogen
Registered User
Join date: 9 Nov 2006
Posts: 684
07-11-2008 01:42
From: Yumi Murakami
If you actually OWN the sim, you can use World -> Region/Estate -> Debug -> Show Top Scripts, which will show which scripts in the sim are causing the most lag, and you can highlight them (or the objects that contain them) with the Beacon if you want.


Sadly, it's not really accurate, at least when you are searching for the reason of lag peaks. I had it happening more than once that I thought I caught the troublesome script and returned the object - just to see that another script was affected next time. A script showing a dramatically high time consumption could very well just be a victim of another, deeper problem on the server side - and not the reason for it.
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
07-11-2008 03:13
From: Daniel Regenbogen
Sadly, it's not really accurate, at least when you are searching for the reason of lag peaks. I had it happening more than once that I thought I caught the troublesome script and returned the object - just to see that another script was affected next time. A script showing a dramatically high time consumption could very well just be a victim of another, deeper problem on the server side - and not the reason for it.

Yes I learned that lesson too, best to do a number of checks over a couple of hours. I did see scripts spike often when the sim was having problems, but ona good day those same scripts were very low.
_____________________
Kitty Barnett
Registered User
Join date: 10 May 2006
Posts: 5,586
07-11-2008 03:24
From: Yumi Murakami
Unfortunately, if you don't own the sim as a private island, there's no way to do this.
Estate managers have access to that as well :).

It's probably best done on a full sim though, rather than an openspace.

---

(Not relevant to the OP's question, but if you want to check the impact of one item in particular)

Or something everyone can do: find an abandoned Linden full (not openspace) water sim, make sure you have all your own attachments with scripts in them detached and wear the script you're working on/want to time as an attachment and use the Script Time statistic in the Statistics Bar as a guideline.
Lucrezia Lamont
Neko Onmyoji
Join date: 25 Jan 2007
Posts: 808
07-11-2008 06:40
Not all sim owners have this tool -- only ESTATE owners. Which sucks. I co own nearly 2 sims of mainland and there's no way to check for lag inducing scripts. I wish there was.

What I really wish is that there was a device that could check individual builds for such. This would help so many creators. People don't realize they're created a laggy product.

If you do wish to test an object, however, find a friend with an estate and ask them to use the estate tools on your object which you rez and leave there for a while (sometimes it takes a bit before the lag builds up with some scripts).
_____________________
Ronin Neko Onmyoji
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
07-11-2008 06:54
Maybe not a 100% solution but people interested in this thread might want to check out SVC-835 and give it a vote..

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

From: SVC-835
Allow "Top Scripts on Parcel" for mainland land owners

Suggestion to allow mainland land owners the ability to find scripts that are misbehaving on their land and for script writers to be able to get performance measurements without needing to be an estate manager.

I think this should include a new estate switch so that estate managers (LL on the mainland) could allow land owners to see Top Scripts on their parcels and a new group role priv so that group owners could control who has access to this on group-owned land.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
07-11-2008 10:49
The tool would be far more useful if it reported a low-pass filtered value for script time taken, rather than merely the reading for the last cycle. Due to how it is, you have to refresh quite a number of times to have a chance of finding the culprits.

Also, keep in mind that for the most part, scripts don't cause lag.

Laggy scripts cause other scripts to lag.

Scripts that chat too much can cause chat to lag. This includes scripts that chat on channels other than zero, and there's no sure-fire way I know of to detect these.

Scripts that actually change things inworld (movement, textures, etc -- but not nonphysical rotation) do not lag the sim. For example, I once was working on an object that used a non-physical movement script set, which got away from me, and it definitely lagged the sim! So, suspect huge vehicles that can move. Fortunately, these show up right away using estate tools.

The main causes of lag are avatars and overbuild, not scripts. That doesn't let scripts off the hook, of course. But they seem to get most of the blame, due to their mysteriouness to many non-scripters.
Troy Vogel
Marginal Prof. of ZOMG!
Join date: 16 Aug 2004
Posts: 478
07-11-2008 12:11
Pretty much:
anything that listens to chat, (scripted windows that listen for your command)
Senses objects and avatars (scanners security devices -- some, other security tools, polling tools, data gathering scripts)
anything that spawns many objects ( a rezzor)

Try to minimize items like these....
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
07-11-2008 18:00
Good point; I forgot sensors.

Listens are an issue, but as I said they only slow down other scripts -- they don't "lag the sim" or make your client frame rate lower. It's possible that they also cause chat lag. That doesn't seem the case based on LL's technical description of how listens work, but I haven't tested it, and *something* causes chat lag on what otherwise seem to be healthy, responsive sims. Sure wish I knew what! But it might just be "a bad SL day" kinda thing rather than something under our control. It does seem to come and go without rhyme or reason.

Rezzing objects definitely counts; it's changing things inworld.

There are other things too, like overuse of dataserver, which slows down transactions and looking up profiles, and they can affect more than just your sim.

And I also neglected to mention particles, which can slow down your frame rate; a different kind of lag. Fortunately, you can fix this very easily by reducing the particle count in Preferences -> Graphics. Lots of rotating nonphysical objects can have a similar effect and you can't shut them down in preferences.

The bottom line is, to find out what's causing "lag" you first have to say what kind of lag it is -- what kinds of things are slow to respond.
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
07-11-2008 22:26
Mono will be here soon.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
07-12-2008 06:42
From: Osprey Therian
Mono will be here soon.


Mono will alleviate the problem at first. Eventually, however, human nature will take its course: people will load up content until SL becomes unbearable, then back off a bit until it's tolerable.

We've met the enemy, and they is us.

Of course, the cool thing is, with mono, we'll get more *content* before we reach the breaking point. And with more memory, scripts won't have to play as many costly games to work around the current memory limit, wo se get an amplified benefit with newly created content.
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
07-12-2008 08:06
mono takes it to new levels.

Most people will still use crappily coded and crappily compiled animation overriders, sensors and vehicle flight-feathers (without modify perm or optimization knowledge) while new scripts are over 10x as efficient.

Mono will be the maglev in a steampowered traffic jam.
DancesWithRobots Soyer
Registered User
Join date: 7 Apr 2006
Posts: 701
07-12-2008 08:41
Only problem with mono is all the old lsl scripts will still be around, unless their developers take the time to recompile them and pass out the upgraded products. (yeah right) But that still leaves all the scripts done by AV's who just don't exist any more, and the ones that break or lose performance under mono.
_____________________
"Two lives I have.
One life I live. One life I dream.
In dreams I remember the better in me."
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
07-13-2008 20:39
We need to start an ad campaign to make Mono-compiled scripts the desirable new accessory for 2008.

Hate lag?
Still using those laggy old scripts your grandfather compiled in LSL? What's up with that?
Mono will make your scripts faster, better, and more sexeh.
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
07-13-2008 20:56
I thought LL were going to recompile all scripts on the grid to Mono when it was rolled out, and that was the reason why the server retains a copy of the source code to all scripts (rather than just the compiled code). The Mono checkbox is for the beta test only.
Kalel Venkman
Citizen
Join date: 10 Mar 2006
Posts: 587
07-14-2008 07:57
I was under the impression that scripts would have to be voluntarily recompiled, and that any such would be recompiled using the new MONO back end. There may be some legacy scripts that break after being recompiled, especially those that depend on tacit timing delays.

Ten times faster sure sounds nice, though. It will take LSL-based attempts at artificial intelligence into a whole new realm of practical possibility.
Jackson Racer
Mhm I gotta SL Blog
Join date: 19 Dec 2006
Posts: 130
07-15-2008 06:28
From: Osprey Therian
Mono will be here soon.



Have they even gave an idea when Mono is coming out? I hope there will be some classes on this. Im going to need them!
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
07-15-2008 06:38
From: Jackson Racer
Have they even gave an idea when Mono is coming out? I hope there will be some classes on this. Im going to need them!

The plan was to roll out 1.23 last week then do 1.24, the MONO release, next week. The 1.23 deploy had problems and still hasn't hit the grid (for long) yet.

Dunno what their current plan is now but MONO should be on the main grid by the end of this month, possibly as early as next week.

From: Ollj Oh
...while new scripts are over 10x as efficient..

And some, even if coded very nicely, won't see much difference at all. IIRC, it's the math-heavy ones that are going to see the real performance boost. Having MONO isn't going to make things like vendors suddenly be able to deliver stuff quicker if the asset servers are hurting. MONO's just one piece of a really big puzzle.
HoneyBear Lilliehook
Owner, The Mall at Cherry
Join date: 18 Jun 2007
Posts: 4,500
07-15-2008 06:44
ok, I'll bite....what's MONO, besides the kissing disease?
_____________________
Virtual Freebies now has its own domain!
URL=http://virtualfreebiesblog.com

The Mall at Cherry Park - new vendors, new look!
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
07-15-2008 07:35
From: HoneyBear Lilliehook
ok, I'll bite....what's MONO, besides the kissing disease?

http://wiki.secondlife.com/wiki/Mono

It's sorta changing the way scripts are handled, under the SL covers. In theory, non-scripting users should not notice any difference except that some of their scripted objects, especially ones that do lots of math, may run a lot faster and have less of an impact on the sim. There may also be cases where MONO scripts are slower...

People who do sorta-basic scripting probably won't notice much difference. People who (on purpose) push scripts to the limit may need to change the way they think about memory management in scripts.