Scripts no longer crash sim after 5 minutes (override InitializeLifetimeService). Loading/Unloading of scripts are now handled in separate thread so server is no delayed because of this. Each script is loaded into a single AppDomain (temporary test for script unload, eats ~15KB more memory for each script). Unload of scripts has been verified to free up memory.

This commit is contained in:
Tedd Hansen
2007-08-25 15:31:47 +00:00
parent 573fb3a609
commit 53be4774b3
7 changed files with 190 additions and 60 deletions

View File

@@ -62,7 +62,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
{
// Add to queue for all scripts in ObjectID object
//myScriptEngine.m_logger.Verbose("ScriptEngine", "EventManager Event: touch_start");
Console.WriteLine("touch_start localID: " + localID);
//Console.WriteLine("touch_start localID: " + localID);
myScriptEngine.myEventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] { (int)1 });
}
public void OnRezScript(uint localID, LLUUID itemID, string script)
@@ -85,6 +85,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
// Path.Combine("ScriptEngines", "Default.lsl"),
// new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost()
//);
Console.WriteLine("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
myScriptEngine.myScriptManager.StopScript(
localID,
itemID
@@ -96,7 +97,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
// These needs to be hooked up to OpenSim during init of this class
// then queued in EventQueueManager.
// When queued in EventQueueManager they need to be LSL compatible (name and params)
public void state_entry() { }
//public void state_entry() { } //
public void state_exit() { }
//public void touch_start() { }
public void touch() { }