Closed
Description
The controller thread keeps looping over and over while trying to select ready channels and control connections, creating many Iterator objects and high GC usage.
One of the Iterator was removed but the second one is inside NIO Selector class. We need to have the controller thread sleep by default (as long as possible to prevent unnecessary CPU cycles, not too long to be able to collect idle connections) and wakeup/interrupt it when an event occurs such as:
- NIO channel ready detected
- Connection event detected (new connection/message/entity chunk to
process)
See this wiki pages to details on this connector and the pending tasks:
http://wiki.restlet.org/developers/172-restlet/g3/354-restlet.html
See related discussion thread:
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2970496