httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: [PATCH] 10x performance increase patch #1
Date Fri, 09 Jul 1999 00:39:09 GMT
On Thu, 8 Jul 1999, Mike Abbott wrote:

> 	- my 64-bit port with documentation.  See the new file
> 	  htdocs/manual/64-bit.html for details.

Oh no!  :)  We've gone through this before, about 2 years ago.

I haven't read your 64-bit doc yet, you might answer my questions.

First observation:  we don't like adding casts.  I've picked a few
examples from your patch which I'm wondering about.

-    if (server->sin_addr.s_addr != htonl(INADDR_ANY))
+    if (server->sin_addr.s_addr != (ap_uint32) htonl(INADDR_ANY))

According to Single Unix, htonl is defined to return uint32_t.  No cast
should be necessary...

-               n = fread(buf, sizeof(char), IOBUFSIZE, f);
+               n = (int) fread(buf, sizeof(char), IOBUFSIZE, f);

would seem to be better done by changing the type of n to be size_t.

I'm also curious about some of your choices... such as changing:

-   long bytes_written;
+   ap_int32 bytes_written;

In general you seem to have chosen the 32-bit quantity when ssize_t
or size_t would seem far more appropriate...

> 	- a lot of general cleanup to make Apache compile without any
> 	  warnings from SGI's lint-like compilers.  This involves adding
> 	  a lot of /*ARGSUSED*/ comments to eliminate "argument not
> 	  used" warnings, changing "while(1)" to "for(;;)" to eliminate
> 	  "constant controlling expression" warnings, updating function
> 	  prototypes, and the like.

Could we just turn off the "argument not used" warnings?  They're a
waste of time in code laden with function pointers like we have.
The rest look fine.

Still perusing... I'm thinking of adopting most of this into mpm.


View raw message