- Only calculate normals on the necessary domain
- Functions for exporting generic data
- Parallelize export of multiple submeshes
- Parallelize export within a single submesh
- Resize vectors to correct size to avoid reallocation
- Simplify hot loops to improve performance
- Optimize single material case to avoid index remapping
`write_submeshes` timing information (average of many runs)
| Test | Before | After |
| ------------------------------ | --------- | --------- |
| 6 million vert mesh | 791.99 ms | 130.75 ms |
| 1.5 million vert 100 materials | crash | 48.27 ms |
| Mr. Elephant test file | 778.95 ms | 277.06 ms |
Pull Request: https://projects.blender.org/blender/blender/pulls/113412