Scripts: Difference between revisions

From CasperTech Wiki
Jump to navigation Jump to search
mNo edit summary
Line 3: Line 3:
   |}
   |}


==Script Time==
== '''<span style="color:#00528c">Script Time </span>''' ==


Most people know that CasperVend uses '''only one script''' in all its vendor units and dropboxes. But how important is this, really? Let us look at the actual script time being used, and relative efficiencies.  
Most people know that CasperVend uses '''only one script''' in all its vendor units and dropboxes. But how important is this, really? Let us look at the actual script time being used, and relative efficiencies.  
Line 11: Line 11:
CasperVend vendors run at roughly 0.001 - 0.002ms of script time per frame. This means you could theoretically have 11,000 of our vendors rezzed before experiencing lag.
CasperVend vendors run at roughly 0.001 - 0.002ms of script time per frame. This means you could theoretically have 11,000 of our vendors rezzed before experiencing lag.


==Script Memory==
== '''<span style="color:#00528c">Script Memory </span>''' ==


Another factor is script memory. A simulator has 256mb of script memory, and each of our vendors uses 66kb.  
Another factor is script memory. A simulator has 256mb of script memory, and each of our vendors uses 66kb.  
This means that we would run out of memory after 3971 vendors were rezzed, so that is our actual limit.
This means that we would run out of memory after 3971 vendors were rezzed, so that is our actual limit.


==Your region==
== '''<span style="color:#00528c">Your region </span>''' ==


Of course, these numbers assume you have *no other scripts* rezzed on sim, but this is never the case. In order to properly calculate how many CasperVend vendors you can rez before you see any lag, go to:
Of course, these numbers assume you have *no other scripts* rezzed on sim, but this is never the case. In order to properly calculate how many CasperVend vendors you can rez before you see any lag, go to:
Line 28: Line 28:
Mutiply the script count by 66kb and you have the rough memory usage - in my case, it's 34496kb (or 33mb), so I have 223mb available to use - enough for around 3,500 CasperVend vendors. Subtract the script time from 22 and you have the amount of script time you have available to play with. In my case I have 20.315ms available, which is easily enough for the 3,500 vendors (it could support 20,000 of them).
Mutiply the script count by 66kb and you have the rough memory usage - in my case, it's 34496kb (or 33mb), so I have 223mb available to use - enough for around 3,500 CasperVend vendors. Subtract the script time from 22 and you have the amount of script time you have available to play with. In my case I have 20.315ms available, which is easily enough for the 3,500 vendors (it could support 20,000 of them).


==Vendor Limits Within Sim/Region Script Limits==
== '''<span style="color:#00528c"> Vendor Limits Within Sim/Region Script Limits </span>''' ==


Normal panel vendors from these companies were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" or "sleeping" period. This table shows the results of this test:
Normal panel vendors from these companies were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" or "sleeping" period. This table shows the results of this test:
Line 51: Line 51:
|}
|}


==Holovendors & Rezzing ==
== '''<span style="color:#00528c"> Holovendors & Rezzing </span>''' ==


Certain types of operation are very taxing on sim resources. The two laggiest operations are teleporting in/out of a region, and rezzing objects.
Certain types of operation are very taxing on sim resources. The two laggiest operations are teleporting in/out of a region, and rezzing objects.
Line 61: Line 61:
CasperVend HoloVend has a configurable time limit you can set - if you don't want an item to stay rezzed all the time, simply set a time limit greater than "0" on the Holovendor configuration page.
CasperVend HoloVend has a configurable time limit you can set - if you don't want an item to stay rezzed all the time, simply set a time limit greater than "0" on the Holovendor configuration page.


== CasperVend Script Times ==
== '''<span style="color:#00528c"> CasperVend Script Times </span>''' ==


The table below lists script times for the various vending objects within CasperVend itself.  
The table below lists script times for the various vending objects within CasperVend itself.  

Revision as of 13:09, 21 August 2014

Script Time

Most people know that CasperVend uses only one script in all its vendor units and dropboxes. But how important is this, really? Let us look at the actual script time being used, and relative efficiencies.

A sim/region runs at approximately 45 frames per second when it's not lagged. This allows roughly 22ms *total* script time per region.

CasperVend vendors run at roughly 0.001 - 0.002ms of script time per frame. This means you could theoretically have 11,000 of our vendors rezzed before experiencing lag.

Script Memory

Another factor is script memory. A simulator has 256mb of script memory, and each of our vendors uses 66kb. This means that we would run out of memory after 3971 vendors were rezzed, so that is our actual limit.

Your region

Of course, these numbers assume you have *no other scripts* rezzed on sim, but this is never the case. In order to properly calculate how many CasperVend vendors you can rez before you see any lag, go to:

World -> Region/Estate -> Debug -> Get Top Scripts

Refresh this a few times, and note the *maximum* number at the top, for example, mine says:

"539 scripts taking a total of 1.685ms."

Mutiply the script count by 66kb and you have the rough memory usage - in my case, it's 34496kb (or 33mb), so I have 223mb available to use - enough for around 3,500 CasperVend vendors. Subtract the script time from 22 and you have the amount of script time you have available to play with. In my case I have 20.315ms available, which is easily enough for the 3,500 vendors (it could support 20,000 of them).

Vendor Limits Within Sim/Region Script Limits

Normal panel vendors from these companies were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" or "sleeping" period. This table shows the results of this test:

Vending System Script count (multivendors) Script time Script mem Max # of vendors
HippoVend 10 0.016 655kb 400
Alika 3 0.002 197kb 1330
BSM 2 0.003 131kb 2001
HippoVend "Elite" 1 0.002 66kb 3971
CasperVend 1 0.001 66kb 3971

Holovendors & Rezzing

Certain types of operation are very taxing on sim resources. The two laggiest operations are teleporting in/out of a region, and rezzing objects.

Because of that, and despite their efficient design, CasperVend HoloVend vendors cause significantly more lag than other CasperVend vendors, while they are being used. When idle, they don't cause much lag at all.

As a result of the lag that rezzing puts on a sim/region (it is one of the laggiest things you can do besides teleport), we don't recommend "temp rezzing" (zero-prim type rezzing) under ANY circumstances - zero-prim rezzer gadgets continually re-rez an object, thus putting that rezzing strain on the sim/region 24/7. This IS the reason many, many landlords will ban the use of temporary/zero-prim rezzers!

CasperVend HoloVend has a configurable time limit you can set - if you don't want an item to stay rezzed all the time, simply set a time limit greater than "0" on the Holovendor configuration page.

CasperVend Script Times

The table below lists script times for the various vending objects within CasperVend itself.

The "Active/Waiting" column simply means that the customer has interacted with the vendor (clicking for a menu, clicking a panel on a multi vendor, etc.) and the vendor is in the waiting period (rather than gone to sleep), waiting for what the customer may do next.

Vendor and expansion objects were rezzed and left to sit for 30 minutes for the scripts to settle into their "idling" period. For the "Active" column, objects were clicked to get a popup menu, followed by an immediate check of the script time once the popup menu was generated.

CasperVend Vendor Type Script time (Idling/Sleeping) Script time (Active/Waiting)
CasperVend² Free/Premium 0.001 0.002
CasperVend² Gatcha 0.002 0.003
CasperVend² HoloVend 0.001 0.007
CasperVend² Lucky Chair 0.002 0.002
CasperVend² Midnight Madness 0.001 0.002
CasperVend² QuantityVend 0.001 0.002
CasperVend² TextureVend 0.001 0.002