Skip to content

Optimize internal connector causing high GC usage #611

Closed
@yanzhou2000

Description

@yanzhou2000

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:

  1. NIO channel ready detected
  2. 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-r​estlet/g3/354-restle​t.html

See related discussion thread:
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2970496

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions