Re: Performance analysis questions
George Phillips <phillips@cs.ubc.ca>
Errors-To: listmaster@www0.cern.ch
Date: Sun, 15 May 1994 04:55:38 +0200
Errors-To: listmaster@www0.cern.ch
Message-id: <8263*phillips@cs.ubc.ca>
Errors-To: listmaster@www0.cern.ch
Reply-To: phillips@cs.ubc.ca
Originator: www-talk@info.cern.ch
Sender: www-talk@www0.cern.ch
Precedence: bulk
From: George Phillips <phillips@cs.ubc.ca>
To: Multiple recipients of list <www-talk@www0.cern.ch>
Subject: Re: Performance analysis questions
X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
Andrew Payne wrote:
>Actually, you can get the best of both methods. Read the first 4 bytes of
>the connection. If the method is POST, read the rest of the connection
>unbuffered and hand the socket off to the script. Otherwise, do large
>block reads and buffer all you'd like. If you seek the ultimate in
>performance, the extra code might be worth it.
Exactly. My suggestion was for a quick hack to halve the processing
time. What you suggest is the right way to fix it. Note that you
can read more than 4 bytes. Assume generosity on what your server
accepts, the minimal HTTP/1.0 request is "GET / HTTP/1.0<LF><LF>".
16 bytes. That will still work with HTTP/0.9 requests since the
record boundary will cut your read short, if necessary.