Received: by taz.hyperreal.com (8.8.4/V2.0) id VAA28945; Sun, 16 Feb 1997 21:23:02 -0800 (PST) Received: by taz.hyperreal.com (8.8.4/V2.0) id VAA28929; Sun, 16 Feb 1997 21:22:59 -0800 (PST) Date: Sun, 16 Feb 1997 21:22:59 -0800 (PST) From: Roy Fielding Message-Id: <199702170522.VAA28929@taz.hyperreal.com> To: apache-cvs@hyperreal.com Subject: cvs commit: apache/src CHANGES mod_include.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com fielding 97/02/16 21:22:58 Modified: src CHANGES mod_include.c Log: Added double-buffering to mod_include to improve performance on server-side includes. Submitted by: Marc Slemko Reviewed by: Roy Fielding, Brian Behlendorf, Dean Gaudet Revision Changes Path 1.166 +3 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.165 retrieving revision 1.166 diff -C3 -r1.165 -r1.166 *** CHANGES 1997/02/17 04:52:38 1.165 --- CHANGES 1997/02/17 05:22:56 1.166 *************** *** 33,38 **** --- 33,41 ---- auto initializers, multiple is_matchexp calls on a static string, and excessive merging of response_code_strings. [Dean Gaudet] + *) Added double-buffering to mod_include to improve performance on + server-side includes. [Marc Slemko] + *) Several fixes for suexec wrapper. [Randy Terbush] - Make wrapper work for files on NFS filesystem. - Fix portability problem of MAXPATHLEN. 1.22 +67 -14 apache/src/mod_include.c Index: mod_include.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_include.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C3 -r1.21 -r1.22 *** mod_include.c 1997/01/20 04:28:13 1.21 --- mod_include.c 1997/02/17 05:22:57 1.22 *************** *** 113,156 **** } } ! #define GET_CHAR(f,c,r,p) \ { \ int i = getc(f); \ ! if(feof(f) || ferror(f) || (i == -1)) { \ ! pfclose(p,f); \ ! return r; \ } \ c = (char)i; \ } - /* --------------------------- Parser functions --------------------------- */ - - /* Grrrr... rputc makes this slow as all-get-out. Elsewhere, it doesn't - * matter much, but this is an inner loop... - */ - int find_string(FILE *in,char *str, request_rec *r, int printing) { int x,l=strlen(str),p; char c; p=0; while(1) { ! GET_CHAR(in,c,1,r->pool); if(c == str[p]) { ! if((++p) == l) return 0; } else { if (printing) { for(x=0;xpool,f); \ ! return ret; \ } \ c = (char)i; \ } int find_string(FILE *in,char *str, request_rec *r, int printing) { int x,l=strlen(str),p; + char outbuf[OUTBUFSIZE]; + int outind = 0; char c; p=0; while(1) { ! GET_CHAR(in,c,1,r); if(c == str[p]) { ! if((++p) == l) { ! FLUSH_BUF(r); return 0; + } } else { if (printing) { for(x=0;x