diff options
author | John Hurliman | 2009-10-19 15:19:09 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-19 15:19:09 -0700 |
commit | 142008121e2e9c5ca5fca5de07b8a14e37279800 (patch) | |
tree | 003824e2639ba00636e3133d2f991b62d8b79bdc /OpenSim/Region/CoreModules | |
parent | Merge branch 'prioritization' of ssh://opensimulator.org/var/git/opensim into... (diff) | |
download | opensim-SC-142008121e2e9c5ca5fca5de07b8a14e37279800.zip opensim-SC-142008121e2e9c5ca5fca5de07b8a14e37279800.tar.gz opensim-SC-142008121e2e9c5ca5fca5de07b8a14e37279800.tar.bz2 opensim-SC-142008121e2e9c5ca5fca5de07b8a14e37279800.tar.xz |
* Change Util.FireAndForget to use ThreadPool.UnsafeQueueUserWorkItem(). This avoids .NET remoting and a managed->unmanaged->managed jump. Overall, a night and day performance difference
* Initialize the LLClientView prim full update queue to the number of prims in the scene for a big performance boost
* Reordered some comparisons on hot code paths for a minor speed boost
* Removed an unnecessary call to the expensive DateTime.Now function (if you *have* to get the current time as opposed to Environment.TickCount, always use DateTime.UtcNow)
* Don't fire the queue empty callback for the Resend category
* Run the outgoing packet handler thread loop for each client synchronously. It seems like more time was being spent doing the execution asynchronously, and it made deadlocks very difficult to track down
* Rewrote some expensive math in LandObject.cs
* Optimized EntityManager to only lock on operations that need locking, and use TryGetValue() where possible
* Only update the attachment database when an object is attached or detached
* Other small misc. performance improvements
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 332d3ce..53c64cb 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -147,9 +147,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
147 | client.OnParcelDwellRequest += ClientOnParcelDwellRequest; | 147 | client.OnParcelDwellRequest += ClientOnParcelDwellRequest; |
148 | client.OnParcelDeedToGroup += ClientOnParcelDeedToGroup; | 148 | client.OnParcelDeedToGroup += ClientOnParcelDeedToGroup; |
149 | 149 | ||
150 | if (m_scene.Entities.ContainsKey(client.AgentId)) | 150 | EntityBase presenceEntity; |
151 | if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence) | ||
151 | { | 152 | { |
152 | SendLandUpdate((ScenePresence)m_scene.Entities[client.AgentId], true); | 153 | SendLandUpdate((ScenePresence)presenceEntity, true); |
153 | SendParcelOverlay(client); | 154 | SendParcelOverlay(client); |
154 | } | 155 | } |
155 | } | 156 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index b9b7da5..bfe85f1 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -139,10 +139,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
139 | } | 139 | } |
140 | else | 140 | else |
141 | { | 141 | { |
142 | //Normal Calculations | 142 | // Normal Calculations |
143 | return Convert.ToInt32( | 143 | return (int)Math.Round(((float)LandData.Area / 65536.0f) * (float)m_scene.objectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); |
144 | Math.Round((Convert.ToDecimal(LandData.Area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * | ||
145 | Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ; | ||
146 | } | 144 | } |
147 | } | 145 | } |
148 | public int GetSimulatorMaxPrimCount(ILandObject thisObject) | 146 | public int GetSimulatorMaxPrimCount(ILandObject thisObject) |