httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: SGI Patch 10xpatch-2.0a6-5 - eliminate use of sprintf() to format inet_ntoa conversions
Date Fri, 23 Feb 2001 13:08:53 GMT
On Fri, 23 Feb 2001, Bill Stoddard wrote:

> I know as fact that sprintf() is pure performance evil.  We need to eliminate
> it everywhere possible in the server. This patch remove two calls to sprintf
> for each connection.
>
> This patch needs to be reworked to fit into inet_ntop.c.  Possibly  Resubmit
> and I will review and commit it (unless someone else calls out a severe
> problem that I don;t see).

Taking a REALLY quick look at the patch and the server, this is overkill.
We only use inet_ntoa in one place in the server.  For inet_ntop, we only
use psprintf to translate integers into strings.  What we really need is a
VERY simple function that given an integer, will turn it into a string.
This should be a five or six line function, and it can be used everywhere.

Ryan


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message