On 08/03/16 12:15, Claes Redestad wrote:
Hi Michael,
On 2016-03-08 12:27, Michael McMahon wrote:
Could I get the following webrev reviewed please?
http://cr.openjdk.java.net/~michaelm/8151299/webrev.1/
get on LinkedList is O(n), so the for-loop in resetInterestOps
sneakily has quadratic complexity. One of many reasons ArrayList is
almost always the better option.
Ok, ArrayList is probably better even though it will generally be quite
a small list.
Iterator-based removal would work, or building a new list to replace
pending with might be more efficient. The synchronization scheme seems
a bit flaky as well?
The new code is always called from the same thread. So, I don't see an
issue?
Unrelated, but what is debugList? Seems like some leftover dead code.
I'll check that out. I may leave some debug code in there, but commented
out.
Thanks
Michael
Thanks!
/Claes