I have 2 different meshes with roughtly the same amount of faces/verts. In the first case I only have 1 object in blend file, in second case around 80. This is the only difference I can think of, in both cases verts don't have any layers associated with them, and no other things I can think of.
I'm running a script on both, that add roughly the same amount of vertices. I was measuring only the calls to mesh.verts.new(), and the results were quite funny. In the first case creating roughly 200k verts took 3.5 seconds, in second case 45.5 seconds.
So the question is, what can cause such a huge difference in performance when doing something as basic as adding a vertex?
The script is pretty straightforward, I'm grabbing a mesh by calling bmesh.from_edit_mesh(), then according to some logic (which is irrelevant, since I'm measuring only calls to mesh.verts.new) I call mesh.verts.new around 200k times, then I call bmesh.update_edit_mesh. So that's 1 update total. Basically it's a subdivide operator I wrote, because my mesh is a hexagonal grid and blender doesn't cope well with subdividing hexagons