httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Sun, 24 Mar 2002 06:42:14 GMT
brianp      02/03/23 22:42:14

  Modified:    modules/filters mod_include.c
  Log:
  Small performance optimization for find_end_sequence(): when we find
  the start of a directive, scan through the rest of it in a minimal
  loop before popping back out to the main char-at-a-time parser loop
  
  Revision  Changes    Path
  1.205     +7 -2      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.204
  retrieving revision 1.205
  diff -u -r1.204 -r1.205
  --- mod_include.c	20 Mar 2002 17:41:54 -0000	1.204
  +++ mod_include.c	24 Mar 2002 06:42:14 -0000	1.205
  @@ -609,10 +609,15 @@
                   if (ctx->state == PARSE_DIRECTIVE) {
                       if (ctx->tag_length == 0) {
                           if (!apr_isspace(*c)) {
  +                            const char *tmp = c;
                               ctx->tag_start_bucket = dptr;
                               ctx->tag_start_index  = c - buf;
  -                            ctx->tag_length       = 1;
  -                            ctx->directive_length = 1;
  +                            do {
  +                                c++;
  +                            } while ((c < buf + len) && !apr_isspace(*c) &&
  +                                     *c != *str);
  +                            ctx->tag_length = ctx->directive_length = c - tmp;
  +                            continue;
                           }
                       }
                       else {
  
  
  

Mime
View raw message