You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ci/libobs_modules.py. It computes each module's key (BLAKE3 over its sources, depfile include closure, generated headers, normalised flags, compiler identity, triple, build type and LTO mode), restores modcache/<key>.a before the build and imports hits as IMPORTED libraries (-DOBS_LIBOBS_MODULE_CACHE=<dir>). On a miss it builds and stores. The default cache dir sits next to the zccache root.
Acceptance criteria
A fresh build directory with a warm cache builds libobs in at most 30% of the baseline cold wall time with zero C compiles, and changing one group rebuilds only its module.
RED then GREEN where a check applies; record before and after build times. Parent: #3256.
Claiming: #3262 (stacked on #3318, which turns the modules into archives).
Plan, one PR:
RED: ci/test_libobs_modules_cache.py. Over the compile commands of a configured tree, a module's key must be the same for two build dirs, and must change only for the module whose group or included header changed. The CMake side must import a hit as an IMPORTED archive.
GREEN: ci/libobs_modules.py:
key: per module, BLAKE3 over the module's group sources, their header closure (-M -MG, preprocessor only), the compile commands with the build dir normalised, and the compiler's --version.
restore: copies hits to <build>/libobs-modcache/ and writes hits.cmake.
store: copies the built archives of the misses.
libobs/cmake/modules.cmake: when OBS_LIBOBS_MODULE_CACHE is set, a hit becomes add_library(... STATIC IMPORTED) and its sources are not compiled.
Before and after times: a fresh build dir with a warm cache, and a one-group edit.
Claim bot:@zackees, this can't be claimed yet: it needs investigation before anyone can implement it. Comment Claiming: investigation to take the research.
Done in #3321: libobs modules are keyed by their normalised compile commands, header closure and compiler version, restored as imported archives, and stored with pruning. MSVC keying is not supported yet; #3264 wires the cache into CI.
Activity
zackees commentedon Oct 31, 2026
/investigate
Blocked by #3261 (cached
.afiles need static module archives to import) and #3257 (the 30% criterion needs the baseline).zackees commentedon Nov 1, 2026
Claiming: #3262 (stacked on #3318, which turns the modules into archives).
Plan, one PR:
ci/test_libobs_modules_cache.py. Over the compile commands of a configured tree, a module's key must be the same for two build dirs, and must change only for the module whose group or included header changed. The CMake side must import a hit as an IMPORTED archive.ci/libobs_modules.py:key: per module, BLAKE3 over the module's group sources, their header closure (-M -MG, preprocessor only), the compile commands with the build dir normalised, and the compiler's--version.restore: copies hits to<build>/libobs-modcache/and writeshits.cmake.store: copies the built archives of the misses.libobs/cmake/modules.cmake: whenOBS_LIBOBS_MODULE_CACHEis set, a hit becomesadd_library(... STATIC IMPORTED)and its sources are not compiled.github-actions commentedon Nov 1, 2026
Claim bot: @zackees, this can't be claimed yet: it needs investigation before anyone can implement it. Comment
Claiming: investigationto take the research.test(libobs): the lib-module cache keys modules by what they compile (#…
build(libobs): cache lib-module archives by what they compile (#3262)
zackees commentedon Nov 1, 2026
Done in #3321: libobs modules are keyed by their normalised compile commands, header closure and compiler version, restored as imported archives, and stored with pruning. MSVC keying is not supported yet; #3264 wires the cache into CI.
build(libobs): cache lib-module archives by what they compile (obs-ru…