DerivedMesh will be removed in Blender 2.8. So I'm just getting ahead.
One disadvantage of using Mesh is that the struct does not have the BVHCache * bvhCache member.
In DerivedMesh, the bvhtree is stored until the object is modified.
Without this cache, bvhtree is created every time the snap context starts (transform operator, scene.raycast ...). The function becomes less efficient.
- Remembering that the boundbox is tested before creating the bvhtree.
However, it is somewhat advantageous to clear memory.
So, add or not the BVHCache * bvhCache member to the struct Mesh ?