Skip to content

7% of the overall runtime spent in SelectableEventLoop.debugDescription #754

Closed
@weissi

Description

@weissi

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.

requestLogger[metadataKey: "ahc-el"] = "\(self.eventLoop)"

Screenshot 2024-07-23 at 11 55 05 am

FWIW, the super basic perf test I used is this: weissi@bf7dbeb (this code isn't meant to be merged).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions