Use raw Blender structs and mesh data rather than using the RNA API. There isn't any benefit from using the RNA when Cycles is compiled with Blender anyway, and a profile showed that the majority of time was spent in Blender RNA API functions. This gives a significant improvement in performance when ingesting meshes. Here are some tests of the runtime of the `create_mesh` function (in seconds): | | Before | After | | ------------------------- | ------ | ----- | | Grid | 0.66 | 0.11 | | Many realized cubes | 2.60 | 0.48 | | Large curve to mesh setup | 4.18 | 1.14 | Also change to resizing the arrays and filling them by index rather than appending. This makes the parallel aspect of the logic clearer, and makes the loops easier to parallelize in the future, and makes it easier to have a performance benefit when an attribute like `sharp_face` doesn't exist. Pull Request: blender/blender#106275