This takes state of soc-2020-io-performance branch as it was at e9bbfd0c8c7 (2021 Oct 31), merges latest master (2022 Apr 4), adds a bunch of tests, and fixes a bunch of stuff found by said tests. The fixes are detailed in the differential. Timings on my machine (Windows, VS2022 release build, AMD Ryzen 5950X 32 threads): - Rungholt minecraft level (269MB file, 1 mesh): 54.2s -> 14.2s (memory usage: 7.0GB -> 1.9GB). - Blender 3.0 splash scene: "I waited for 90 minutes and gave up" -> 109s. Now, this time is not great, but at least 20% of the time is spent assigning unique names for the imported objects (the scene has 24 thousand objects). This is not specific to obj importer, but rather a general issue across blender overall. Test suite file updates done in Subversion tests repository. Reviewed By: @howardt, @sybren Differential Revision: https://developer.blender.org/D13958
94 lines
1.9 KiB
CMake
94 lines
1.9 KiB
CMake
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set(INC
|
|
.
|
|
./exporter
|
|
./importer
|
|
../../blenkernel
|
|
../../blenlib
|
|
../../bmesh
|
|
../../bmesh/intern
|
|
../../depsgraph
|
|
../../editors/include
|
|
../../makesdna
|
|
../../makesrna
|
|
../../nodes
|
|
../../windowmanager
|
|
../../../../extern/fmtlib/include
|
|
../../../../intern/guardedalloc
|
|
)
|
|
|
|
set(INC_SYS
|
|
|
|
)
|
|
|
|
set(SRC
|
|
IO_wavefront_obj.cc
|
|
exporter/obj_export_file_writer.cc
|
|
exporter/obj_export_mesh.cc
|
|
exporter/obj_export_mtl.cc
|
|
exporter/obj_export_nurbs.cc
|
|
exporter/obj_exporter.cc
|
|
importer/importer_mesh_utils.cc
|
|
importer/obj_import_file_reader.cc
|
|
importer/obj_import_mesh.cc
|
|
importer/obj_import_mtl.cc
|
|
importer/obj_import_nurbs.cc
|
|
importer/obj_importer.cc
|
|
importer/parser_string_utils.cc
|
|
|
|
IO_wavefront_obj.h
|
|
exporter/obj_export_file_writer.hh
|
|
exporter/obj_export_io.hh
|
|
exporter/obj_export_mesh.hh
|
|
exporter/obj_export_mtl.hh
|
|
exporter/obj_export_nurbs.hh
|
|
exporter/obj_exporter.hh
|
|
importer/importer_mesh_utils.hh
|
|
importer/obj_import_file_reader.hh
|
|
importer/obj_import_mesh.hh
|
|
importer/obj_import_mtl.hh
|
|
importer/obj_import_nurbs.hh
|
|
importer/obj_import_objects.hh
|
|
importer/obj_importer.hh
|
|
importer/parser_string_utils.hh
|
|
)
|
|
|
|
set(LIB
|
|
bf_blenkernel
|
|
)
|
|
|
|
if(WITH_TBB)
|
|
add_definitions(-DWITH_TBB)
|
|
list(APPEND INC_SYS ${TBB_INCLUDE_DIRS})
|
|
list(APPEND LIB ${TBB_LIBRARIES})
|
|
endif()
|
|
|
|
blender_add_lib(bf_wavefront_obj "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
|
|
|
if(WITH_GTESTS)
|
|
set(TEST_SRC
|
|
tests/obj_exporter_tests.cc
|
|
tests/obj_importer_tests.cc
|
|
tests/obj_exporter_tests.hh
|
|
)
|
|
|
|
set(TEST_INC
|
|
${INC}
|
|
|
|
../../blenloader
|
|
../../../../tests/gtests
|
|
)
|
|
|
|
set(TEST_LIB
|
|
${LIB}
|
|
|
|
bf_blenloader_tests
|
|
bf_wavefront_obj
|
|
)
|
|
|
|
include(GTestTesting)
|
|
blender_add_test_lib(bf_wavefront_obj_tests "${TEST_SRC}" "${TEST_INC}" "${INC_SYS}" "${TEST_LIB}")
|
|
add_dependencies(bf_wavefront_obj_tests bf_wavefront_obj)
|
|
endif()
|