Blender Git Commit Log
Git Commits -> Revision 0ea70ab
Revision 0ea70ab by Ankit Meel (soc-2020-io-performance) June 8, 2020, 18:57 (GMT) |
Add faster fprintf writer, remove unused headers Changes here: Reverted temporarily to std::vector to keep working, instead of waiting for D7931 to get committed in master. Adds an forced inline function for calculation of face/ polygon normals by averaging vertex normals. I will look for an existing method. This way, the allocated memory in `data_to_export->mvert[i].no` is actually used. Also, `BLI::Vector<uint> face_normal_index` is not needed anymore since we loop over the same polygon list while writing normals, so their indices will be the same. Adds a writer method option, `fprintf`, which is faster than `fstream`. With fstream, 478 MB of an ico-sphere with 8 subsurf takes 22 seconds. with fprintf, the same takes 13 seconds. With fstream, a 44 MB of cube with 8 subsurf take 2.3 seconds. with fprintf, the same takes 1.4 seconds. Adds timing info of the full export directly in console. Removed unused and repeated headers from `wavefront_obj.cc`. Differential Revision: https://developer.blender.org/D7959 |
Commit Details:
Full Hash: 0ea70ab8e54cf284af12badb4341bd7f31b7fccd
Parent Commit: 86845ea
Lines Changed: +124, -42
6 Modified Paths:
/source/blender/io/wavefront_obj/intern/wavefront_obj.cc (+6, -0) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj.hh (+10, -8) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj_exporter.cc (+19, -23) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj_file_handler.cc (+82, -10) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj_file_handler.hh (+6, -0) (Diff)
/source/blender/io/wavefront_obj/IO_wavefront_obj.h (+1, -1) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj.hh (+10, -8) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj_exporter.cc (+19, -23) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj_file_handler.cc (+82, -10) (Diff)
/source/blender/io/wavefront_obj/intern/wavefront_obj_file_handler.hh (+6, -0) (Diff)
/source/blender/io/wavefront_obj/IO_wavefront_obj.h (+1, -1) (Diff)