aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs34
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs6
4 files changed, 45 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
index 786e0b5..be8a9a2 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
@@ -65,13 +65,26 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
65 } 65 }
66 } 66 }
67 67
68 internal struct ScopedRegionPosition
69 {
70 public UUID m_scopeID;
71 public ulong m_regionHandle;
72 public ScopedRegionPosition(UUID scopeID, ulong handle)
73 {
74 m_scopeID = scopeID;
75 m_regionHandle = handle;
76 }
77 }
78
68 private ExpiringCache<ScopedRegionUUID, GridRegion> m_UUIDCache; 79 private ExpiringCache<ScopedRegionUUID, GridRegion> m_UUIDCache;
69 private ExpiringCache<ScopedRegionName, ScopedRegionUUID> m_NameCache; 80 private ExpiringCache<ScopedRegionName, ScopedRegionUUID> m_NameCache;
81 private ExpiringCache<ScopedRegionPosition, GridRegion> m_PositionCache;
70 82
71 public RegionInfoCache() 83 public RegionInfoCache()
72 { 84 {
73 m_UUIDCache = new ExpiringCache<ScopedRegionUUID, GridRegion>(); 85 m_UUIDCache = new ExpiringCache<ScopedRegionUUID, GridRegion>();
74 m_NameCache = new ExpiringCache<ScopedRegionName, ScopedRegionUUID>(); 86 m_NameCache = new ExpiringCache<ScopedRegionName, ScopedRegionUUID>();
87 m_PositionCache = new ExpiringCache<ScopedRegionPosition, GridRegion>();
75 } 88 }
76 89
77 public void Cache(GridRegion rinfo) 90 public void Cache(GridRegion rinfo)
@@ -96,6 +109,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
96 { 109 {
97 ScopedRegionName name = new ScopedRegionName(scopeID,rinfo.RegionName); 110 ScopedRegionName name = new ScopedRegionName(scopeID,rinfo.RegionName);
98 m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS); 111 m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS);
112
113 ScopedRegionPosition pos = new ScopedRegionPosition(scopeID, rinfo.RegionHandle);
114 m_PositionCache.AddOrUpdate(pos, rinfo, CACHE_EXPIRATION_SECONDS);
99 } 115 }
100 } 116 }
101 117
@@ -114,6 +130,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
114 return null; 130 return null;
115 } 131 }
116 132
133 public GridRegion Get(UUID scopeID, ulong handle, out bool inCache)
134 {
135 inCache = false;
136
137 GridRegion rinfo = null;
138 ScopedRegionPosition pos = new ScopedRegionPosition(scopeID, handle);
139 if (m_PositionCache.TryGetValue(pos, out rinfo))
140 {
141 inCache = true;
142 return rinfo;
143 }
144
145 return null;
146 }
147
148
117 public GridRegion Get(UUID scopeID, string name, out bool inCache) 149 public GridRegion Get(UUID scopeID, string name, out bool inCache)
118 { 150 {
119 inCache = false; 151 inCache = false;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
index 6f364ae..e6c89d7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
@@ -186,10 +186,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
186 186
187 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) 187 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
188 { 188 {
189 GridRegion rinfo = m_LocalGridService.GetRegionByPosition(scopeID, x, y); 189 bool inCache = false;
190 GridRegion rinfo = m_RegionInfoCache.Get(scopeID, Util.UIntsToLong((uint)x, (uint)y), out inCache);
191 if (inCache)
192 return rinfo;
193
194 rinfo = m_LocalGridService.GetRegionByPosition(scopeID, x, y);
190 if (rinfo == null) 195 if (rinfo == null)
191 rinfo = m_RemoteGridService.GetRegionByPosition(scopeID, x, y); 196 rinfo = m_RemoteGridService.GetRegionByPosition(scopeID, x, y);
192 197
198 m_RegionInfoCache.Cache(rinfo);
193 return rinfo; 199 return rinfo;
194 } 200 }
195 201
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 91aa228..02a163f 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -290,7 +290,8 @@ namespace OpenSim.Region.CoreModules.World.Land
290 ParcelFlags.AllowGroupScripts | 290 ParcelFlags.AllowGroupScripts |
291 ParcelFlags.CreateGroupObjects | 291 ParcelFlags.CreateGroupObjects |
292 ParcelFlags.AllowAPrimitiveEntry | 292 ParcelFlags.AllowAPrimitiveEntry |
293 ParcelFlags.AllowGroupObjectEntry); 293 ParcelFlags.AllowGroupObjectEntry |
294 ParcelFlags.AllowFly);
294 } 295 }
295 296
296 if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale)) 297 if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale))
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6cde89c..4a08ce3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1604,9 +1604,9 @@ namespace OpenSim.Region.Framework.Scenes
1604 dupe.GroupPosition = GroupPosition; 1604 dupe.GroupPosition = GroupPosition;
1605 dupe.OffsetPosition = OffsetPosition; 1605 dupe.OffsetPosition = OffsetPosition;
1606 dupe.RotationOffset = RotationOffset; 1606 dupe.RotationOffset = RotationOffset;
1607 dupe.Velocity = new Vector3(0, 0, 0); 1607 dupe.Velocity = Velocity;
1608 dupe.Acceleration = new Vector3(0, 0, 0); 1608 dupe.Acceleration = Acceleration;
1609 dupe.AngularVelocity = new Vector3(0, 0, 0); 1609 dupe.AngularVelocity = AngularVelocity;
1610 dupe.Flags = Flags; 1610 dupe.Flags = Flags;
1611 1611
1612 dupe.OwnershipCost = OwnershipCost; 1612 dupe.OwnershipCost = OwnershipCost;