Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Generally, it seems to be preferred to avoid calling .size() on a Java ConcurrentLinkedQueue. This is an O(N) operation as it must iterate through all the nodes.
Calling this every time through the loop makes this issue worse under high load. It seems like the same functionality can be attained by just polling and checking for null.
This is more imperative and less functional, but it seems alright since this is in lower-level networking code.