When a prim is a Sculptie or Mesh, the prim's shape contains a field called
SculptData which stores the full mesh or texture (for sculpties). If the
prim is serialized then the field "SculptData" is also serialized, which is
a problem because it contains the entire contents of the mesh or texture.
This makes actions such as detaching a mesh attachment extremely slow.

I think that we should remove SculptData from the serialized XML format of
prims. This means that we'll stop serializing it, and when we get an XML
with SculptData we'll ignore it.

See also: http://opensimulator.org/mantis/view.php?id=7038 ("Unwearing mesh
attachments very slow").

As far as I can tell, the shape's SculptData field (in memory) should
usually be empty. It only needs to be filled with the asset data in two
1. When the mesh is first uploaded
2. If the Physics system needs to create a physics mesh

In both cases, after the mesh data has been used it should be cleared
immediately, to save memory.

Regarding the behavior of the physics system, I see a few things that could
be a problem with the way it's currently implemented. What currently happens
is this: ODEPrim.CheckMeshAsset() loads the mesh/sculptie data if it's
needed. Later, Meshmerizer.CreateMeshFromPrimMesher() clears the data once
it has finished using it. This raises a couple of questions:

1. Where does BulletSim load the mesh data? It doesn't use ODEPrim.
2. It looks like Meshmerizer.CreateMeshFromPrimMesher() can sometimes return
early, without clearing the mesh data. Seems to me that it should always
clear it.

So besides removing "SculptData" from the XML format of prims, I also want
to make Meshmerizer clear the data more aggressively. And I don't know how
BulletSim uses meshes, but perhaps it also needs to be changed.



View this message in context: 
Sent from the opensim-dev mailing list archive at Nabble.com.
Opensim-dev mailing list

Reply via email to