FBX IO: Speed up export by multithreading array compression #105018

Merged
Thomas Barlow merged 6 commits from Mysteryem/blender-addons:fbx_multithread_array_compression_pr into main 2024-01-12 21:39:20 +01:00

6 Commits

Author SHA1 Message Date
1bf83e19ba Increase FBX IO version 2024-01-12 20:35:49 +00:00
aca36c7ba0 Merge branch 'main' into fbx_multithread_array_compression_pr 2024-01-12 20:34:47 +00:00
5112fd91f5 Enable multithreaded array compression in json2fbx.py 2023-12-02 23:18:11 +00:00
d32879355d Update for multithreading utils being moved to fbx_utils_threading.py 2023-12-02 23:12:55 +00:00
5aa031177f fix json2fbx.py 2023-11-21 06:01:58 +00:00
7864ccac7d FBX IO: Multithread exported array compression
zlib.compress releases the GIL so can be multithreaded.

This patch adds a context manager to FBXElem that temporarily enables
multithreading of the compression of added arrays, by using the recently
added utility to schedule CPU-bound tasks to run on separate threads.

On my Ryzen 7 7800x, exporting non-animated rigged humanoid models
typically results in about a 1.2 to 1.4 times faster export.

Exporting only simple geometry, such as many subdivided default cubes,
can be about 2 to 3 times faster.

No changes are expected to the contents of exported files.
2023-11-21 05:35:10 +00:00