FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Streamline DefaultChannelPool checkout and close paths by hyperxpro · Pull Request #2183 · AsyncHttpClient/async-http-client · GitHub

Streamline DefaultChannelPool checkout and close paths - #2183

Merged
hyperxpro merged 2 commits into
mainfrom
perf/channelpool
Jun 7, 2026
Merged

Streamline DefaultChannelPool checkout and close paths#2183
hyperxpro merged 2 commits into
mainfrom
perf/channelpool

Conversation

Copy link
Copy Markdown
Member

Motivation:
DefaultChannelPool allocates a fresh IdleChannel holder on every keep-alive checkout and scans the partition deque O(n) to remove a channel on close.

Modification:
Store the bare Channel in the deque with idle state (timestamp + owned flag) on a reused per-channel attribute, and make removeAll an O(1) tombstone that the idle cleaner unlinks lazily.

Result:
Behavior-preserving; checkout drops 56 -to- 24 B/op and removeAll goes from O(n) to O(1) (depth-independent), per JMH on JDK 11.

hyperxpro merged commit 24339e5 into main Jun 7, 2026
28 of 30 checks passed
hyperxpro deleted the perf/channelpool branch June 7, 2026 13:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL