Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ad57fe175c2f3f542264c06786497448f506fcb2
      
https://github.com/WebKit/WebKit/commit/ad57fe175c2f3f542264c06786497448f506fcb2
  Author: Zak Ridouh <[email protected]>
  Date:   2026-07-31 (Fri, 31 Jul 2026)

  Changed paths:
    M Source/cmake/WebKitCCache.cmake

  Log Message:
  -----------
  [CMake] Use ccache depend mode
https://bugs.webkit.org/show_bug.cgi?id=320687
rdar://183671196

Reviewed by Elliott Williams.

When a direct-mode lookup misses, ccache falls back to running the
preprocessor and hashing its output. That pass cannot use the precompiled
header and expands the full header set textually, so it costs more than the
compile it is meant to avoid: measured against an uncached compile of the
same translation unit, +0.42s on Source/WTF/wtf/ASCIICType.cpp and +2.17s on
a WebCore unified bundle. Over 90% of cacheable calls currently miss, so
that is paid on nearly every compile.

Depend mode hashes the -MD depfile instead, which every compile rule here
already produces, so a miss costs little more than an uncached compile:
+0.13s and +0.70s for the same two files, or 0.29s and 1.47s saved per miss.
It trades a somewhat lower hit rate, since the preprocessor fallback also
absorbed cosmetic command-line differences, for break-even dropping from
roughly a 21% to a 2% hit rate.

Depend mode keys cache entries differently, so existing entries are not
reused and the first build after this change is all misses.

* Source/cmake/WebKitCCache.cmake:

Canonical link: https://commits.webkit.org/318372@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to