aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-07-19 14:36:53 +0100
committerMelanie2010-07-19 14:36:53 +0100
commit575f7d3366552562d0a5c0d8c481e96f8805f973 (patch)
tree2bba00e21c99eaa04b72563e12daa8f83d35fcc1 /OpenSim/Region
parentRevert "A stab in the dark. Revert the compile lockout temporarily. If you kn... (diff)
downloadopensim-SC_OLD-575f7d3366552562d0a5c0d8c481e96f8805f973.zip
opensim-SC_OLD-575f7d3366552562d0a5c0d8c481e96f8805f973.tar.gz
opensim-SC_OLD-575f7d3366552562d0a5c0d8c481e96f8805f973.tar.bz2
opensim-SC_OLD-575f7d3366552562d0a5c0d8c481e96f8805f973.tar.xz
Revert "Thank you, Snoopy, for a patch to reduce sim script startup CPU usage"
This reverts commit c404c5fb5405eac24cc8b7cd402eb8d8fb0ff0cf.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs22
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index cabcf37..46febe3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -31,7 +31,6 @@ using System.IO;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections; 32using System.Collections;
33using System.Reflection; 33using System.Reflection;
34using System.Threading;
35using OpenMetaverse; 34using OpenMetaverse;
36using log4net; 35using log4net;
37using OpenSim.Framework; 36using OpenSim.Framework;
@@ -201,7 +200,6 @@ namespace OpenSim.Region.Framework.Scenes
201 if ((int)InventoryType.LSL == item.InvType) 200 if ((int)InventoryType.LSL == item.InvType)
202 { 201 {
203 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); 202 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
204 Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug
205 } 203 }
206 } 204 }
207 } 205 }
@@ -259,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes
259 // m_log.InfoFormat( 257 // m_log.InfoFormat(
260 // "[PRIM INVENTORY]: " + 258 // "[PRIM INVENTORY]: " +
261 // "Starting script {0}, {1} in prim {2}, {3}", 259 // "Starting script {0}, {1} in prim {2}, {3}",
262 // item.Name, item.ItemID, m_part.Name, m_part.UUID); 260 // item.Name, item.ItemID, Name, UUID);
263 261
264 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) 262 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
265 return; 263 return;
@@ -295,20 +293,20 @@ namespace OpenSim.Region.Framework.Scenes
295 } 293 }
296 else 294 else
297 { 295 {
296 if (m_part.ParentGroup.m_savedScriptState != null)
297 RestoreSavedScriptState(item.OldItemID, item.ItemID);
298
298 lock (m_items) 299 lock (m_items)
299 { 300 {
300 if (m_part.ParentGroup.m_savedScriptState != null)
301 RestoreSavedScriptState(item.OldItemID, item.ItemID);
302
303 m_items[item.ItemID].PermsMask = 0; 301 m_items[item.ItemID].PermsMask = 0;
304 m_items[item.ItemID].PermsGranter = UUID.Zero; 302 m_items[item.ItemID].PermsGranter = UUID.Zero;
305
306 string script = Utils.BytesToString(asset.Data);
307 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
308 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
309 m_part.ParentGroup.AddActiveScriptCount(1);
310 m_part.ScheduleFullUpdate();
311 } 303 }
304
305 string script = Utils.BytesToString(asset.Data);
306 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
307 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
308 m_part.ParentGroup.AddActiveScriptCount(1);
309 m_part.ScheduleFullUpdate();
312 } 310 }
313 } 311 }
314 } 312 }