Skip to content
Sam Hocevar edited this page Jun 1, 2018 · 3 revisions

Fastbuild: improve cache hits

Directories to watch

  • /c/Program\ Files\ \(x86\)/Windows\ Kits/10/include (may contain 10.0.14393.0 or 10.0.16299.0)

Cache misses

Cache format:

BC/CE/BCCE823FDD71540D_19A4BEEB_433E742499611AC7-0000000000000000.9
----- ---------------- -------- ---------------- ----------------
  |             |        |       \- toolchain checksum    \- PDB checksum
  |             |        \- commandline checksum
  \- sharding   \- preprocessed source checksum

Main causes for cache misses:

Commandline mismatch

FIXED: https://github.com/poppolopoppo/fastbuild/commit/2d19b9a355a8fea2d50ac54603d52fc8bee188df

Still causing problems in UE4:

  • PROJECT_COPYRIGHT_STRING, PROJECT_PRODUCT_NAME etc. are specified in the commandline, preventing from sharing the cache between projects sharing the same engine; ignoring this issue for now
  • {gamename}/Intermediate/Build/Win64/{gamename}/... is referenced in the commandline, making it particularly hard to share cache across projects.

Preprocessed output mismatch

Still causing problems in UE4:

  • The assert macros use __FILE__ with escaped backslashes \\ which defeats the patch above. Fix pending.
  • LaunchEngineLoop.cpp contains the compilation timestamp (seems harmless)
  • PCH hashes are not stable

Toolchain mismatch

Need to investigate which versions are installed.