You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2001/07/31 02:34:27 UTC

cvs commit: httpd-2.0/server connection.c

stoddard    01/07/30 17:34:27

  Modified:    server   connection.c
  Log:
  The read() in apr_recv() would always be called first and return EAGAIN.
  This one change to eliminate the read unless there are really bytes to read
  is good for a 7 to 9% performance boost on AIX.
  
  Revision  Changes    Path
  1.84      +1 -0      httpd-2.0/server/connection.c
  
  Index: connection.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/connection.c,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- connection.c	2001/07/12 03:20:48	1.83
  +++ connection.c	2001/07/31 00:34:27	1.84
  @@ -195,6 +195,7 @@
        */
       timeout = SECONDS_TO_LINGER * APR_USEC_PER_SEC;
       apr_setsocketopt(c->client_socket, APR_SO_TIMEOUT, timeout);
  +    apr_setsocketopt(c->client_socket, APR_INCOMPLETE_READ, 1);
       for (;;) {
           nbytes = sizeof(dummybuf);
           rc = apr_recv(c->client_socket, dummybuf, &nbytes);