Hi all, Let me present the improvements to the Java layer of legacy j.n.c.Selector [1]. Most of the ideas from this patch are already used in committed epoll()-based Selector [2], they all strives to move away from O(n) at Java layer and prevent performance issues due to useless work.
This patch gives as much as 2x boosts on selectNow() microtest. This patch successfully passes JUnit tests and simple workloads. I believe that this patch should be verified and committed to reside in the trunk as the base for further optimizations, if any. Surely one should consider using EpollSelectorProviderImpl for heavy workloads, but this patch should help on Windows too. Thanks, Aleksey. [1] https://issues.apache.org/jira/browse/HARMONY-4869 [2] https://issues.apache.org/jira/browse/HARMONY-4879
