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

cpu-performance
Justin Clark-Casey (justincc) 2013-06-12 23:32:51 +01:00
commit ef5be42c86
6 changed files with 41 additions and 20 deletions

View File

@ -125,11 +125,10 @@ namespace OpenSim.Framework
Animation other = obj as Animation; Animation other = obj as Animation;
if (other != null) if (other != null)
{ {
return (other.AnimID == this.AnimID return (other.AnimID.Equals(this.AnimID)
&& other.SequenceNum == this.SequenceNum && other.SequenceNum == this.SequenceNum
&& other.ObjectID == this.ObjectID); && other.ObjectID.Equals(this.ObjectID) );
} }
return base.Equals(obj); return base.Equals(obj);
} }

View File

@ -312,18 +312,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation
buff.Append("dflt="); buff.Append("dflt=");
buff.Append(DefaultAnimation.ToString()); buff.Append(DefaultAnimation.ToString());
buff.Append(",iDflt="); buff.Append(",iDflt=");
if (DefaultAnimation == ImplicitDefaultAnimation) if (DefaultAnimation.Equals(ImplicitDefaultAnimation))
buff.Append("same"); buff.Append("same");
else else
buff.Append(ImplicitDefaultAnimation.ToString()); buff.Append(ImplicitDefaultAnimation.ToString());
if (m_animations.Count > 0) if (m_animations.Count > 0)
{ {
buff.Append(",anims="); buff.Append(",anims=");
bool firstTime = true;
foreach (OpenSim.Framework.Animation anim in m_animations) foreach (OpenSim.Framework.Animation anim in m_animations)
{ {
if (!firstTime)
buff.Append(",");
buff.Append("<"); buff.Append("<");
buff.Append(anim.ToString()); buff.Append(anim.ToString());
buff.Append(">,"); buff.Append(">");
firstTime = false;
} }
} }
return buff.ToString(); return buff.ToString();

View File

@ -94,6 +94,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
{ {
SendAnimPack(); SendAnimPack();
m_scenePresence.TriggerScenePresenceUpdated();
} }
} }
@ -135,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
if (m_animations.Remove(animID, allowNoDefault)) if (m_animations.Remove(animID, allowNoDefault))
{ {
SendAnimPack(); SendAnimPack();
m_scenePresence.TriggerScenePresenceUpdated();
} }
} }

View File

@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); // m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name);
// } // }
private void TriggerScenePresenceUpdated() public void TriggerScenePresenceUpdated()
{ {
if (m_scene != null) if (m_scene != null)
m_scene.EventManager.TriggerScenePresenceUpdated(this); m_scene.EventManager.TriggerScenePresenceUpdated(this);

View File

@ -168,10 +168,10 @@ public abstract class BSShape
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched) if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
{ {
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing; prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}", physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. prim={1}, texture={2}",
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}", physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,prim={1},tex={2}",
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
} }
else else
{ {
@ -238,17 +238,17 @@ public abstract class BSShape
{ {
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch) if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
{ {
physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}", physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. prim={1}, texture={2}",
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}", physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,prim={1},tex={2}",
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
} }
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing) if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
{ {
physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. obj={1}, texture={2}", physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. prim={1}, texture={2}",
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,objNam={1},tex={2}", physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,prim={1},tex={2}",
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
} }
} }
} }
@ -260,6 +260,19 @@ public abstract class BSShape
return fillShape.physShapeInfo; return fillShape.physShapeInfo;
} }
public static String UsefulPrimInfo(BSScene pScene, BSPhysObject prim)
{
StringBuilder buff = new StringBuilder(prim.PhysObjectName);
buff.Append("/pos=");
buff.Append(prim.RawPosition.ToString());
if (pScene != null)
{
buff.Append("/rgn=");
buff.Append(pScene.Name);
}
return buff.ToString();
}
#endregion // Common shape routines #endregion // Common shape routines
} }
@ -528,8 +541,7 @@ public class BSShapeMesh : BSShape
{ {
// Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh. // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing; prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim={1}", LogHeader, UsefulPrimInfo(physicsScene, prim) );
LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey); physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
} }
} }

View File

@ -1,5 +1,9 @@
CURRENT PROBLEMS TO FIX AND/OR LOOK AT CURRENT PROBLEMS TO FIX AND/OR LOOK AT
================================================= =================================================
Vehicle buoyancy. Computed correctly? Possibly creating very large effective mass.
Interaction of llSetBuoyancy and vehicle buoyancy. Should be additive?
Negative buoyancy computed correctly
Computation of mesh mass. How done? How should it be done?
Script changing rotation of child prim while vehicle moving (eg turning wheel) causes Script changing rotation of child prim while vehicle moving (eg turning wheel) causes
the wheel to appear to jump back. Looks like sending position from previous update. the wheel to appear to jump back. Looks like sending position from previous update.
Enable vehicle border crossings (at least as poorly as ODE) Enable vehicle border crossings (at least as poorly as ODE)