<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=NO-BOK link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>There are some new config options you might
be handy.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Especially the option to share script
execution threads between regions.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>OpenSim.INI:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>[ScriptEngine.DotNetEngine]<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; When a script receives an event the event
is queued.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Any free thread will start executing this
event. One script can only have one event executed simultaneously.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; If you have only one thread, and one
script has a loop or does a lot of work, then no other scripts can run at the
same time.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Same if you have 10 threads, then only 10
scripts can be run simultaneously. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; But because most scripts exit after their
task, the threads are free to go on to the next script.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Number of threads to use for script event
execution<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Threads are shared across all regions<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>NumberOfScriptThreads=2<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Should the script threads be private for
each region?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; true: Each region will get
<NumberOfScriptThreads> dedicated to scripts within that region<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>;      
Number of threads will be <NumberOfScriptThreads>*<NumberOfRegions><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; false: All regions share
<NumberOfScriptThreads> for all their scripts<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>PrivateRegionThreads=false<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; How long MAX should a script event be
allowed to run (per event execution)?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Do not set this too low (like 50ms) as
there are some time wasted in simply executing a function<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; There is also a small speed penalty for
every kill that is made<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>MaxEventExecutionTimeMs=5000<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Should we enable the max script event
execution thread to look for scripts that exceed their timeslice?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>EnforceMaxEventExecutionTime=true<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; If no scripts have executed in this pass
how long should we sleep before checking again<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Impact:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Too low and you will waste lots of CPU<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>; Too high and people touching object or
similar will have to wait up to this amount of time before script responding<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>SleepTimeIfNoScriptExecutionMs=50<o:p></o:p></span></p>

</div>

</body>

</html>