Revert "Thank you, Snoopy, for a patch to reduce sim script startup CPU usage"
This reverts commit c404c5fb54
.
0.7-release
parent
20c68cc531
commit
251740815f
|
@ -31,7 +31,6 @@ using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -201,7 +200,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if ((int)InventoryType.LSL == item.InvType)
|
if ((int)InventoryType.LSL == item.InvType)
|
||||||
{
|
{
|
||||||
CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
|
CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
|
||||||
Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// m_log.InfoFormat(
|
// m_log.InfoFormat(
|
||||||
// "[PRIM INVENTORY]: " +
|
// "[PRIM INVENTORY]: " +
|
||||||
// "Starting script {0}, {1} in prim {2}, {3}",
|
// "Starting script {0}, {1} in prim {2}, {3}",
|
||||||
// item.Name, item.ItemID, m_part.Name, m_part.UUID);
|
// item.Name, item.ItemID, Name, UUID);
|
||||||
|
|
||||||
if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
|
if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
|
||||||
return;
|
return;
|
||||||
|
@ -295,20 +293,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (m_part.ParentGroup.m_savedScriptState != null)
|
||||||
|
RestoreSavedScriptState(item.OldItemID, item.ItemID);
|
||||||
|
|
||||||
lock (m_items)
|
lock (m_items)
|
||||||
{
|
{
|
||||||
if (m_part.ParentGroup.m_savedScriptState != null)
|
|
||||||
RestoreSavedScriptState(item.OldItemID, item.ItemID);
|
|
||||||
|
|
||||||
m_items[item.ItemID].PermsMask = 0;
|
m_items[item.ItemID].PermsMask = 0;
|
||||||
m_items[item.ItemID].PermsGranter = UUID.Zero;
|
m_items[item.ItemID].PermsGranter = UUID.Zero;
|
||||||
|
|
||||||
string script = Utils.BytesToString(asset.Data);
|
|
||||||
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
|
|
||||||
m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
|
|
||||||
m_part.ParentGroup.AddActiveScriptCount(1);
|
|
||||||
m_part.ScheduleFullUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string script = Utils.BytesToString(asset.Data);
|
||||||
|
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
|
||||||
|
m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
|
||||||
|
m_part.ParentGroup.AddActiveScriptCount(1);
|
||||||
|
m_part.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue