I am loading a quite big mesh (~70000 verts and ~200000 faces).
The verts are loaded (appended) almost instantly but it really takes ages for the faces. I timed 32 seconds per 1000 faces, meaning ~1.5 hours to load the entire mesh!
I put the code below (taken from the Wiki official tut), any idea to speed it up very welcome!
for line in file.readlines(): count +=1 if count%1000 == 0: sys.stderr.write("line:"+str(count)+"
words = line.split() if len(words) == 0 or words.startswith('#'): pass elif words == 'v': x, y, z = float(words), float(words), float(words) mesh.verts.append(Blender.NMesh.Vert(x, y, z)) elif words == 'f': faceVertList =  for faceIdx in words[1:]: faceVert = mesh.verts[int(faceIdx)-1] faceVertList.append(faceVert) newFace = Blender.NMesh.Face(faceVertList) mesh.addFace(newFace)