Commit 0923f0e
committed
Reduce IdleChannel allocations, close #1462
Motivation:
We allocate an AtomicBoolean for every IdleChannel.
We can avoid this cost, all the more as we allocate a IdleChannel just
to be able to remove it from the partition.
Modification:
Use an AtomicIntegerFieldUpdater instead.
Result:
Less allocations caused by IdleChannel.1 parent 468b98f commit 0923f0e
File tree
1 file changed
+13
-7
lines changed- client/src/main/java/org/asynchttpclient/netty/channel
1 file changed
+13
-7
lines changedLines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| 25 | + | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
| |||
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | | - | |
| 116 | + | |
| 117 | + | |
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
119 | | - | |
| 125 | + | |
120 | 126 | | |
121 | 127 | | |
122 | 128 | | |
| |||
0 commit comments