From 2ac834d7971368a6fc3a759f5bbc830cdd095fb6 Mon Sep 17 00:00:00 2001 From: Yaniv Michael Kaul Date: Wed, 15 Apr 2026 09:29:25 +0300 Subject: [PATCH] pch: remove seastar/http/api_docs.hh from precompiled header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The api_docs.hh header contains inline method bodies (api_registry::handle) that call seastar::json::formatter::to_json(), forcing the compiler to instantiate seastar::json template specializations (json_list_template, formatter::write, do_with, etc.) in every compilation unit — even files that never use any HTTP/JSON API types. Measured ~6s of wasted template instantiation per file × ~620 files = ~3,700s total CPU. Only 2 files outside the PCH include api_docs.hh directly, so removing it has no impact on code that actually uses these types. Wall-clock build time (-j16, Seastar/Abseil cached): Before (with loading_cache fix): avg 23m29s After: avg 23m04s (-1.8%) vs original baseline: avg 24m01s (-4.0%) --- stdafx.hh | 1 - 1 file changed, 1 deletion(-) diff --git a/stdafx.hh b/stdafx.hh index 49fc8f39a0..93cfd012d2 100644 --- a/stdafx.hh +++ b/stdafx.hh @@ -254,7 +254,6 @@ #include #include #include -#include #include #include #include