mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 00:50:35 +00:00
pch: remove seastar/http/api_docs.hh from precompiled header
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%)
This commit is contained in:
@@ -254,7 +254,6 @@
|
||||
#include <seastar/coroutine/generator.hh>
|
||||
#include <seastar/coroutine/maybe_yield.hh>
|
||||
#include <seastar/coroutine/parallel_for_each.hh>
|
||||
#include <seastar/http/api_docs.hh>
|
||||
#include <seastar/http/client.hh>
|
||||
#include <seastar/http/common.hh>
|
||||
#include <seastar/http/connection_factory.hh>
|
||||
|
||||
Reference in New Issue
Block a user