diff options
| author | Stefan Boberg <[email protected]> | 2026-04-10 23:06:34 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-04-10 23:06:34 +0200 |
| commit | bbbc608879693e53511c2239bdedd40a9fde6ce1 (patch) | |
| tree | 6b96c3c984d732c21f90e35c5af043ef815e92d5 /src/zenhttp/monitoring/httpstatus.cpp | |
| parent | Reduce short-lived heap allocations in zenserver (diff) | |
| download | zen-bbbc608879693e53511c2239bdedd40a9fde6ce1.tar.xz zen-bbbc608879693e53511c2239bdedd40a9fde6ce1.zip | |
Reduce short-lived heap allocations in zenhttp
- Replace std::vector<std::string_view> with eastl::fixed_vector<std::string_view, 4> 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
Diffstat (limited to 'src/zenhttp/monitoring/httpstatus.cpp')
| -rw-r--r-- | src/zenhttp/monitoring/httpstatus.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |