Files
Bigfoot/CMake/CustomTargets.cmake
T
rboullardandClaude Sonnet 5 ae18a062b7
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF) (push) Successful in 6m12s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON) (push) Successful in 5m49s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF) (push) Successful in 6m33s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON) (push) Successful in 6m50s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF) (push) Successful in 6m48s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF) (push) Failing after 32s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON) (push) Failing after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON) (push) Successful in 6m40s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON) (push) Successful in 15m18s
Bigfoot / Clang Format Checks (push) Failing after 10s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON) (push) Successful in 16m5s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF) (push) Successful in 16m28s
Add Sasquatch: mmap'd, load-only Game-mode asset backend, plus parallel batch loading
Introduces a dual-backend SerializationManager: Tool mode keeps reading/writing
BigFile over SQL as before, Game mode now reads a Sasquatch file instead - a
flattened, mmap'd counterpart to a BigFile produced ahead of time by
Sasquatch::WriteFrom or the new SasquatchPacker CLI tool. The backend is picked
at compile time via a new BIGFOOT_TOOL_MODE option (mirrors the existing
BIGFOOT_OPTIMIZED/BIGFOOT_NOT_OPTIMIZED pattern); SaveAsset only exists in Tool
mode, since a running game never writes back to its own asset pack.

Also adds SerializationManager::LoadAssets (Game-mode only): loads a batch of
UUIDs by decoding them across multiple threads instead of one at a time,
layered by HardReference depth so a reference target is always fully
registered before anything decodes a reference to it. This required making
HardReference/SoftReference resolution genuinely thread-safe (it mutates
ContainerHandle ref counts and AssetLibrary's UUID index/unreferenced-set from
inside Unpack()) via atomic ref counts and targeted mutexes, validated by
dedicated concurrency tests exercising real thread contention.

BigFile itself is faster too: prepared statements are now pooled per query
text instead of recompiled on every Request (pooled rather than cached-as-one
because LoadAsset recurses and a naive cache would corrupt an in-flight
statement), and PRAGMA mmap_size is enabled.

Benchmarked against real Asset<T> objects (AssetsForBenchmarking) through the
full Pack/Unpack/HardReference pipeline: Sasquatch's raw storage layer hits
~31 GiB/s (mmap ceiling), and the new parallel LoadAssets reaches ~18 GiB/s
end-to-end versus ~1.3 GiB/s for the existing sequential LoadAsset loop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 17:43:21 +02:00

21 lines
934 B
CMake

add_library(BigfootCompileAndLinkFlags INTERFACE)
target_compile_options(BigfootCompileAndLinkFlags INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>
$<$<CXX_COMPILER_ID:Clang,GNU>:-Wall -Wextra -Wpedantic -Werror>
$<$<AND:$<BOOL:${COVERAGE}>,$<CXX_COMPILER_ID:Clang>>:-fprofile-instr-generate -fcoverage-mapping>
)
target_link_options(BigfootCompileAndLinkFlags INTERFACE
$<$<AND:$<BOOL:${COVERAGE}>,$<CXX_COMPILER_ID:Clang>>:-fprofile-instr-generate>
)
target_compile_definitions(BigfootCompileAndLinkFlags INTERFACE
$<$<PLATFORM_ID:Windows>:NOMINMAX>
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>
$<$<PLATFORM_ID:Windows>:BIGFOOT_WINDOWS>
$<$<PLATFORM_ID:Linux>:BIGFOOT_LINUX>
$<$<CONFIG:Release>:BIGFOOT_OPTIMIZED>
$<$<CONFIG:Debug,RelWithDebInfo>:BIGFOOT_NOT_OPTIMIZED>
$<$<BOOL:${BIGFOOT_TOOL_MODE}>:BIGFOOT_TOOL>
$<$<NOT:$<BOOL:${BIGFOOT_TOOL_MODE}>>:BIGFOOT_GAME>)