[
https://issues.apache.org/jira/browse/DIRMINA-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Trustin Lee closed DIRMINA-546.
-------------------------------
Resolution: Fixed
The following test method:
@Test
public void mina() throws Exception {
SocketAcceptor acceptor = new NioSocketAcceptor();
acceptor.setHandler(new IoHandlerAdapter());
acceptor.setDefaultLocalAddress(new InetSocketAddress(8080));
acceptor.bind();
long start = System.currentTimeMillis();
for (int i = 0; i < 10000; i ++) {
new Socket("127.0.0.1", 8080).close();
}
long end = System.currentTimeMillis();
System.out.println(end - start);
}
prints out the following result:
Before optimization - 38412
After optimization 11212
> Reduce unnecessary system calls when a new session is created.
> --------------------------------------------------------------
>
> Key: DIRMINA-546
> URL: https://issues.apache.org/jira/browse/DIRMINA-546
> Project: MINA
> Issue Type: Improvement
> Components: Transport
> Affects Versions: 2.0.0-M1
> Reporter: Trustin Lee
> Assignee: Trustin Lee
> Fix For: 2.0.0-M2
>
>
> So far, MINA has been setting all socket parameters for every newly created
> socket. It means MINA performs several unnecessary system calls. For
> exaimple, Socket.setReceiveBufferSize() is always called even if a user
> didn't change the default value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.