Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

cpu-performance
Diva Canto 2013-05-20 09:26:15 -07:00
commit 10e4fb2ce2
19 changed files with 13719 additions and 13698 deletions

View File

@ -426,7 +426,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("="))
assetServerURL = assetServerURL + "/";
m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", assetServerURL + id);
// m_log.DebugFormat("[J2KIMAGE]: texture {0} not found in local asset storage. Trying user's storage.", assetServerURL + id);
AssetService.Get(assetServerURL + id, InventoryAccessModule, AssetReceived);
return;
}

View File

@ -937,6 +937,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
EnableChildAgents(sp);
// Finally, kill the agent we just created at the destination.
// XXX: Possibly this should be done asynchronously.
Scene.SimulationService.CloseAgent(finalDestination, sp.UUID);
}
@ -1481,9 +1482,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return agent;
}
//AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
agent.ControllingClient.RequestClientInfo();
//m_log.Debug("BEFORE CROSS");
//Scene.DumpChildrenSeeds(UUID);
//DumpKnownRegions();
@ -1543,15 +1541,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.CloseChildAgents(neighbourx, neighboury);
AgentHasMovedAway(agent, false);
// // the user may change their profile information in other region,
// // so the userinfo in UserProfileCache is not reliable any more, delete it
// // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE!
// if (agent.Scene.NeedSceneCacheClear(agent.UUID))
// {
// m_log.DebugFormat(
// "[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID);
// }
//m_log.Debug("AFTER CROSS");
//Scene.DumpChildrenSeeds(UUID);

View File

@ -317,7 +317,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
// s.RegionInfo.RegionName, destination.RegionHandle);
Util.FireAndForget(delegate { m_scenes[destination.RegionID].IncomingCloseAgent(id, false); });
m_scenes[destination.RegionID].IncomingCloseAgent(id, false);
return true;
}

View File

@ -422,13 +422,13 @@ namespace OpenSim.Region.Framework.Scenes
// is not allowed to change the export flag.
bool denyExportChange = false;
m_log.InfoFormat("[XXX]: B: {0} O: {1} E: {2}", itemUpd.BasePermissions, itemUpd.CurrentPermissions, itemUpd.EveryOnePermissions);
// m_log.DebugFormat("[XXX]: B: {0} O: {1} E: {2}", itemUpd.BasePermissions, itemUpd.CurrentPermissions, itemUpd.EveryOnePermissions);
// If the user is not the creator or doesn't have "E" in both "B" and "O", deny setting export
if ((item.BasePermissions & (uint)(PermissionMask.All | PermissionMask.Export)) != (uint)(PermissionMask.All | PermissionMask.Export) || (item.CurrentPermissions & (uint)PermissionMask.Export) == 0 || item.CreatorIdAsUuid != item.Owner)
denyExportChange = true;
m_log.InfoFormat("[XXX]: Deny Export Update {0}", denyExportChange);
// m_log.DebugFormat("[XXX]: Deny Export Update {0}", denyExportChange);
// If it is already set, force it set and also force full perm
// else prevent setting it. It can and should never be set unless
@ -452,7 +452,7 @@ namespace OpenSim.Region.Framework.Scenes
// If the new state is exportable, force full perm
if ((itemUpd.EveryOnePermissions & (uint)PermissionMask.Export) != 0)
{
m_log.InfoFormat("[XXX]: Force full perm");
// m_log.DebugFormat("[XXX]: Force full perm");
itemUpd.NextPermissions = (uint)(PermissionMask.All);
}
}

View File

@ -3435,15 +3435,12 @@ namespace OpenSim.Region.Framework.Scenes
if (closeChildAgents && CapsModule != null)
CapsModule.RemoveCaps(agentID);
// // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
// // this method is doing is HORRIBLE!!!
// Commented pending deletion since this method no longer appears to do anything at all
// avatar.Scene.NeedSceneCacheClear(avatar.UUID);
if (closeChildAgents && !isChildAgent)
{
List<ulong> regions = avatar.KnownRegionHandles;
regions.Remove(RegionInfo.RegionHandle);
// This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours.
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
}

View File

@ -222,9 +222,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst)
{
foreach (ulong handle in regionslst)
{
SendCloseChildAgent(agentID, handle);
}
Util.FireAndForget(delegate { SendCloseChildAgent(agentID, handle); });
}
public List<GridRegion> RequestNamedRegions(string name, int maxNumber)

View File

@ -3137,10 +3137,8 @@ namespace OpenSim.Region.Framework.Scenes
if (byebyeRegions.Count > 0)
{
m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");
Util.FireAndForget(delegate
{
m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
});
m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions);
}
foreach (ulong handle in byebyeRegions)

View File

@ -289,6 +289,9 @@ namespace OpenSim.Region.Framework.Scenes
private void statsHeartBeat(object sender, EventArgs e)
{
if (!m_scene.Active)
return;
SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[22];
SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock();

View File

@ -79,6 +79,8 @@ namespace OpenSim.Region.Physics.Meshing
private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh
private List<List<Vector3>> mConvexHulls = null;
private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>();
public Meshmerizer(IConfigSource config)
@ -358,6 +360,61 @@ namespace OpenSim.Region.Physics.Meshing
physicsParms = (OSDMap)map["physics_shape"]; // old asset format
else if (map.ContainsKey("physics_mesh"))
physicsParms = (OSDMap)map["physics_mesh"]; // new asset format
else if (map.ContainsKey("medium_lod"))
physicsParms = (OSDMap)map["medium_lod"]; // if no physics mesh, try to fall back to medium LOD display mesh
else if (map.ContainsKey("high_lod"))
physicsParms = (OSDMap)map["high_lod"]; // if all else fails, use highest LOD display mesh and hope it works :)
if (map.ContainsKey("physics_convex"))
{ // pull this out also in case physics engine can use it
try
{
OSDMap convexBlock = (OSDMap)map["physics_convex"];
if (convexBlock.ContainsKey("HullList"))
{
byte[] hullList = convexBlock["HullList"].AsBinary();
Vector3 min = new Vector3(-0.5f, -0.5f, -0.5f);
if (convexBlock.ContainsKey("Min")) min = convexBlock["Min"].AsVector3();
Vector3 max = new Vector3(0.5f, 0.5f, 0.5f);
if (convexBlock.ContainsKey("Max")) max = convexBlock["Max"].AsVector3();
// decompress and decode hull points
byte[] posBytes = DecompressOsd(convexBlock["Positions"].AsBinary()).AsBinary();
List<List<Vector3>> hulls = new List<List<Vector3>>();
int posNdx = 0;
foreach (byte cnt in hullList)
{
int count = cnt == 0 ? 256 : cnt;
List<Vector3> hull = new List<Vector3>();
for (int i = 0; i < count; i++)
{
ushort uX = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
ushort uY = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
ushort uZ = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
Vector3 pos = new Vector3(
Utils.UInt16ToFloat(uX, min.X, max.X),
Utils.UInt16ToFloat(uY, min.Y, max.Y),
Utils.UInt16ToFloat(uZ, min.Z, max.Z)
);
hull.Add(pos);
}
hulls.Add(hull);
}
mConvexHulls = hulls;
}
}
catch (Exception e)
{
m_log.WarnFormat("[MESH]: exception decoding convex block: {0}", e.Message);
}
}
if (physicsParms == null)
{
@ -377,27 +434,7 @@ namespace OpenSim.Region.Physics.Meshing
// byte[] decompressed = new byte[physSize * 5];
try
{
using (MemoryStream inMs = new MemoryStream(meshBytes))
{
using (MemoryStream outMs = new MemoryStream())
{
using (ZOutputStream zOut = new ZOutputStream(outMs))
{
byte[] readBuffer = new byte[2048];
int readLen = 0;
while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0)
{
zOut.Write(readBuffer, 0, readLen);
}
zOut.Flush();
outMs.Seek(0, SeekOrigin.Begin);
byte[] decompressedBuf = outMs.GetBuffer();
decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf);
}
}
}
decodedMeshOsd = DecompressOsd(meshBytes);
}
catch (Exception e)
{
@ -424,6 +461,41 @@ namespace OpenSim.Region.Physics.Meshing
return true;
}
/// <summary>
/// decompresses a gzipped OSD object
/// </summary>
/// <param name="decodedOsd"></param> the OSD object
/// <param name="meshBytes"></param>
/// <returns></returns>
private static OSD DecompressOsd(byte[] meshBytes)
{
OSD decodedOsd = null;
using (MemoryStream inMs = new MemoryStream(meshBytes))
{
using (MemoryStream outMs = new MemoryStream())
{
using (ZOutputStream zOut = new ZOutputStream(outMs))
{
byte[] readBuffer = new byte[2048];
int readLen = 0;
while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0)
{
zOut.Write(readBuffer, 0, readLen);
}
zOut.Flush();
outMs.Seek(0, SeekOrigin.Begin);
byte[] decompressedBuf = outMs.GetBuffer();
decodedOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf);
}
}
}
return decodedOsd;
}
/// <summary>
/// Generate the co-ords and faces necessary to construct a mesh from the sculpt data the accompanies a prim.
/// </summary>
@ -700,6 +772,27 @@ namespace OpenSim.Region.Physics.Meshing
return true;
}
/// <summary>
/// temporary prototype code - please do not use until the interface has been finalized!
/// </summary>
/// <param name="size">value to scale the hull points by</param>
/// <returns>a list of hulls if they exist and have been successfully decoded, otherwise null</returns>
public List<List<Vector3>> GetConvexHulls(Vector3 size)
{
if (mConvexHulls == null)
return null;
List<List<Vector3>> hulls = new List<List<Vector3>>();
foreach (var hull in mConvexHulls)
{
List<Vector3> verts = new List<Vector3>();
foreach (var vert in hull)
verts.Add(vert * size);
}
return hulls;
}
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod)
{
return CreateMesh(primName, primShape, size, lod, false, true);

View File

@ -544,21 +544,33 @@ namespace OpenSim.Region.ScriptEngine.Shared
set {m_data = value; }
}
// Function to obtain LSL type from an index. This is needed
// because LSL lists allow for multiple types, and safely
// iterating in them requires a type check.
/// <summary>
/// Obtain LSL type from an index.
/// </summary>
/// <remarks>
/// This is needed because LSL lists allow for multiple types, and safely
/// iterating in them requires a type check.
/// </remarks>
/// <returns></returns>
/// <param name='itemIndex'></param>
public Type GetLSLListItemType(int itemIndex)
{
return m_data[itemIndex].GetType();
}
// Member functions to obtain item as specific types.
// For cases where implicit conversions would apply if items
// were not in a list (e.g. integer to float, but not float
// to integer) functions check for alternate types so as to
// down-cast from Object to the correct type.
// Note: no checks for item index being valid are performed
/// <summary>
/// Obtain float from an index.
/// </summary>
/// <remarks>
/// For cases where implicit conversions would apply if items
/// were not in a list (e.g. integer to float, but not float
/// to integer) functions check for alternate types so as to
/// down-cast from Object to the correct type.
/// Note: no checks for item index being valid are performed
/// </remarks>
/// <returns></returns>
/// <param name='itemIndex'></param>
public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex)
{
if (m_data[itemIndex] is LSL_Types.LSLInteger)
@ -589,26 +601,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
public LSL_Types.LSLString GetLSLStringItem(int itemIndex)
{
if (m_data[itemIndex] is LSL_Types.key)
{
return (LSL_Types.key)m_data[itemIndex];
}
else if (m_data[itemIndex] is String)
{
return new LSL_Types.LSLString((string)m_data[itemIndex]);
}
else if (m_data[itemIndex] is LSL_Types.LSLFloat)
{
return new LSL_Types.LSLString((LSLFloat)m_data[itemIndex]);
}
else if (m_data[itemIndex] is LSL_Types.LSLInteger)
{
return new LSL_Types.LSLString((LSLInteger)m_data[itemIndex]);
}
else
{
return (LSL_Types.LSLString)m_data[itemIndex];
}
if (m_data[itemIndex] is LSL_Types.key)
{
return (LSL_Types.key)m_data[itemIndex];
}
else
{
return new LSL_Types.LSLString(m_data[itemIndex].ToString());
}
}
public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex)

View File

@ -218,7 +218,7 @@ namespace OpenSim.Server.Handlers.Simulation
if (action.Equals("release"))
ReleaseAgent(regionID, id);
else
m_SimulationService.CloseAgent(destination, id);
Util.FireAndForget(delegate { m_SimulationService.CloseAgent(destination, id); });
responsedata["int_response_code"] = HttpStatusCode.OK;
responsedata["str_response_string"] = "OpenSim agent " + id.ToString();

View File

@ -1,57 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>OpenMetaverse.Http</name>
</assembly>
<members>
<member name="F:OpenMetaverse.Http.EventQueueServer.CONNECTION_TIMEOUT">
<summary>The number of milliseconds to wait before the connection times out
and an empty response is sent to the client. This value should be higher
than BATCH_WAIT_INTERVAL for the timeout to function properly</summary>
</member>
<member name="F:OpenMetaverse.Http.EventQueueServer.BATCH_WAIT_INTERVAL">
<summary>This interval defines the amount of time to wait, in milliseconds,
for new events to show up on the queue before sending a response to the
client and completing the HTTP request. The interval also specifies the
maximum time that can pass before the queue shuts down after Stop() or the
class destructor is called</summary>
</member>
<member name="F:OpenMetaverse.Http.EventQueueServer.MAX_EVENTS_PER_RESPONSE">
<summary>Since multiple events can be batched together and sent in the same
response, this prevents the event queue thread from infinitely dequeueing
events and never sending a response if there is a constant stream of new
events</summary>
</member>
<member name="T:OpenMetaverse.Http.Logger">
<summary>
Singleton logging class for the entire library
</summary>
</member>
<member name="F:OpenMetaverse.Http.Logger.Log">
<summary>log4net logging engine</summary>
</member>
<member name="F:OpenMetaverse.Http.log4netLogWriter.Instance">
<summary>
Singleton instance of this class
</summary>
</member>
<member name="T:OpenMetaverse.Http.CapsRequestCallback">
<summary>
Delegate for handling incoming HTTP requests through a capability
</summary>
<param name="context">Client context</param>
<param name="request">HTTP request</param>
<param name="response">HTTP response</param>
<param name="state">User-defined state object</param>
</member>
<member name="F:OpenMetaverse.Http.EventQueueClient.REQUEST_TIMEOUT">
<summary>=</summary>
</member>
<member name="F:OpenMetaverse.Http.EventQueueClient._errorCount">
<summary>Number of times we've received an unknown CAPS exception in series.</summary>
</member>
<member name="F:OpenMetaverse.Http.EventQueueClient._random">
<summary>For exponential backoff on error.</summary>
</member>
</members>
</doc>

View File

@ -4,6 +4,123 @@
<name>OpenMetaverse.StructuredData</name>
</assembly>
<members>
<member name="T:OpenMetaverse.StructuredData.OSDType">
<summary>
</summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Unknown">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Boolean">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Integer">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Real">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.String">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.UUID">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Date">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.URI">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Binary">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Map">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Array">
<summary></summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDException">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSD">
<summary>
</summary>
</member>
<member name="M:OpenMetaverse.StructuredData.OSD.SerializeMembers(System.Object)">
<summary>
Uses reflection to create an SDMap from all of the SD
serializable types in an object
</summary>
<param name="obj">Class or struct containing serializable types</param>
<returns>An SDMap holding the serialized values from the
container object</returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSD.DeserializeMembers(System.Object@,OpenMetaverse.StructuredData.OSDMap)">
<summary>
Uses reflection to deserialize member variables in an object from
an SDMap
</summary>
<param name="obj">Reference to an object to fill with deserialized
values</param>
<param name="serialized">Serialized values to put in the target
object</param>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDBoolean">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDInteger">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDReal">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDString">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDUUID">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDDate">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDUri">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDBinary">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDMap">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDArray">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDParser">
<summary>
@ -228,122 +345,5 @@
<param name="c"></param>
<returns></returns>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDType">
<summary>
</summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Unknown">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Boolean">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Integer">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Real">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.String">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.UUID">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Date">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.URI">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Binary">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Map">
<summary></summary>
</member>
<member name="F:OpenMetaverse.StructuredData.OSDType.Array">
<summary></summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDException">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSD">
<summary>
</summary>
</member>
<member name="M:OpenMetaverse.StructuredData.OSD.SerializeMembers(System.Object)">
<summary>
Uses reflection to create an SDMap from all of the SD
serializable types in an object
</summary>
<param name="obj">Class or struct containing serializable types</param>
<returns>An SDMap holding the serialized values from the
container object</returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSD.DeserializeMembers(System.Object@,OpenMetaverse.StructuredData.OSDMap)">
<summary>
Uses reflection to deserialize member variables in an object from
an SDMap
</summary>
<param name="obj">Reference to an object to fill with deserialized
values</param>
<param name="serialized">Serialized values to put in the target
object</param>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDBoolean">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDInteger">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDReal">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDString">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDUUID">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDDate">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDUri">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDBinary">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDMap">
<summary>
</summary>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDArray">
<summary>
</summary>
</member>
</members>
</doc>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.