leif 2004/03/10 05:58:15
Modified:
instrument-manager/src/java/org/apache/excalibur/instrument/manager/http/server
AbstractSocketServer.java
Log:
Significantly improve improve performance by removing some debug code that
does a reverse DNS lookup for client host names. I know better than to have put
that in!
Revision Changes Path
1.6 +8 -5
avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/http/server/AbstractSocketServer.java
Index: AbstractSocketServer.java
===================================================================
RCS file:
/home/cvs/avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/http/server/AbstractSocketServer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractSocketServer.java 29 Feb 2004 18:11:04 -0000 1.5
+++ AbstractSocketServer.java 10 Mar 2004 13:58:15 -0000 1.6
@@ -232,11 +232,14 @@
// Set the SO_TIMEOUT for the socket.
socket.setSoTimeout( m_soTimeout );
- final String remoteHost = socket.getInetAddress().getHostName();
- final String remoteIP =
socket.getInetAddress().getHostAddress();
+ // Set the TCP_NO_DELAY flag for the socket to improve
performance.
+ socket.setTcpNoDelay( true );
- getLogger().debug(
- "Accepted a connection from " + remoteHost + " (" +
remoteIP + ")" );
+ if ( getLogger().isDebugEnabled() )
+ {
+ String remoteIP = socket.getInetAddress().getHostAddress();
+ getLogger().debug( "Accepted a connection from " + remoteIP
);
+ }
// Increment the number of open sockets. This is done here
rather than in
// handleSocketInner so that it will be incremented before we
request a
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]