diff options
author | Melanie | 2010-07-19 14:36:53 +0100 |
---|---|---|
committer | Diva Canto | 2010-07-20 13:25:17 -0700 |
commit | 251740815fe39b99751aac5a6eedc7d4dc5bcbff (patch) | |
tree | 963ac76a916e4ff83fc2968eeeec4b7abaa7ea1b /OpenSim | |
parent | Allow use of old angle rules PSYS_SRC_INNERANGLE and PSYS_SRC_OUTERANGLE in l... (diff) | |
download | opensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.zip opensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.tar.gz opensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.tar.bz2 opensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.tar.xz |
Revert "Thank you, Snoopy, for a patch to reduce sim script startup CPU usage"
This reverts commit c404c5fb5405eac24cc8b7cd402eb8d8fb0ff0cf.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 3a8f168..866bb6e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -31,7 +31,6 @@ using System.IO; | |||
31 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
32 | using System.Collections; | 32 | using System.Collections; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using System.Threading; | ||
35 | using OpenMetaverse; | 34 | using OpenMetaverse; |
36 | using log4net; | 35 | using log4net; |
37 | using OpenSim.Framework; | 36 | using 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 | } |