Commit Graph

9 Commits

Author SHA1 Message Date
Ray Molenkamp fc409e4388 Cleanup: CMake: Modernize extern_fmtlib dependencies
Pretty straightforward

- Remove any fmtlib paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/117787
2024-02-03 18:55:09 +01:00
Campbell Barton 7897e2d299 Cleanup: remove warning suppression which is no longer needed
Since updating fmtlib these aren't needed.
2023-11-30 15:02:52 +11:00
Aras Pranckevicius c0e5929ad2 Externals: update fmtlib to latest version (10.1.1)
The library is used by OBJ/PLY/STL exporters, and several other parts.
Performance of OBJ/PLY export seems to be the same.
2023-11-21 10:43:14 +02:00
Campbell Barton 2f71d9f807 Build: quiet GCC warning for extern/fmtlib 2023-10-05 10:50:58 +11:00
Campbell Barton 49594c37ae License headers: use SPDX-FileCopyrightText for CMake files 2023-06-14 23:36:23 +10:00
Campbell Barton b9ddf2aec6 CMake: quiet uninitialized warning in fmtlib
This can be removed after the next upgrade.
2023-06-08 11:58:05 +10:00
Aras Pranckevicius 0d38fa2422 Externals: compile fmtlib as a library instead of using it with FMT_HEADER_ONLY 2023-05-30 11:17:23 +03:00
Aras Pranckevicius 122c48aed0 Externals: update fmtlib to latest version (10.0.0)
The library is used by OBJ/PLY exporters, and asset_catalog_tree_view.
Performance of OBJ/PLY export seems to be the same. Blender executable
gets a tiny bit smaller (-5kb) on windows.
2023-05-30 10:48:43 +03:00
Aras Pranckevicius e2e4c1daaa OBJ: use fmt library instead of sprintf for faster formatting
On Windows/MSVC this gives a minor (~20%) speedup presumably due to a faster float/int formatter. On macOS (Xcode13), this gives a massive speedup, since snprintf that is in system libraries ends up spending almost all the time inside some locale-related mutex lock.

The actual exporter code becomes quite a bit smaller too, since it does not have to do any juggling to support std::string arguments, and the buffer handling code is smaller as well.

Windows (VS2022 release build, Ryzen 5950X 32 threads) timings:
- Blender 3.0 splash scene (2.4GB obj): 4.57s -> 3.86s
- Monkey subdivided level 6 (330MB obj): 1.10s -> 0.99s

macOS (Xcode 13 release build, Apple M1Max) timings:
- Blender 3.0 splash scene (2.4GB obj): 21.03s -> 5.52s
- Monkey subdivided level 6 (330MB obj): 3.28s -> 1.20s

Linux (ThreadRipper 3960X 48 threads) timings:
- Blender 3.0 splash scene (2.4GB obj): 10.10s -> 4.40s
- Monkey subdivided level 6 (330MB obj): 2.16s -> 1.37s

The produced obj/mtl files are identical to before.

Reviewed By: Howard Trickey, Dalai Felinto

Differential Revision: https://developer.blender.org/D13998
2022-03-27 14:25:48 +03:00