From bbbc608879693e53511c2239bdedd40a9fde6ce1 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 10 Apr 2026 23:06:34 +0200 Subject: Reduce short-lived heap allocations in zenhttp - Replace std::vector with eastl::fixed_vector for route capture segments, eliminating a heap allocation on every routed request - Add transparent comparator to status provider map, eliminating std::string temporary on every /status/ lookup --- src/zenhttp/monitoring/httpstatus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/zenhttp/monitoring/httpstatus.cpp') diff --git a/src/zenhttp/monitoring/httpstatus.cpp b/src/zenhttp/monitoring/httpstatus.cpp index 9fecedb06..cb437c6eb 100644 --- a/src/zenhttp/monitoring/httpstatus.cpp +++ b/src/zenhttp/monitoring/httpstatus.cpp @@ -47,7 +47,7 @@ HttpStatusService::HandleRequest(HttpServerRequest& Request) case HttpVerb::kGet: { RwLock::SharedLockScope _(m_Lock); - if (auto It = m_Providers.find(std::string{Key}); It != end(m_Providers)) + if (auto It = m_Providers.find(Key); It != end(m_Providers)) { return It->second->HandleStatusRequest(Request); } -- cgit v1.2.3