async-http-client
async-http-client copied to clipboard
7% of the overall runtime spent in `SelectableEventLoop.debugDescription`
Just noticed that when just running loads of sequential super basic HTTP requests against a fast server (NIOHTTP1Server), we spent about 7% of the overall runtime in HTTP1ClientChannelHandler.request.setter which spends most of its time in _print_unlocked<A, B>(_:_:) because it's pulling a debugDescription for EventLoop for the logger metadata :P (release mode compile of course)
Should be an easy fix.
https://github.com/swift-server/async-http-client/blob/54d1006dc90b9ee77b4d04d63ad8688d2215dc1e/Sources/AsyncHTTPClient/ConnectionPool/HTTP1/HTTP1ClientChannelHandler.swift#L39
FWIW, the super basic perf test I used is this: https://github.com/weissi/async-http-client/commit/bf7dbeb933433bc111942808ec5ed9108c44be72 (this code isn't meant to be merged).