From: Brian Pane Date: Sun, 24 Mar 2002 06:42:14 +0000 (+0000) Subject: Small performance optimization for find_end_sequence(): when we find X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e2fcbdff5545adf1b6e9a1d88f3fd5009b05484;p=apache 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94153 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 13ca2fc077..389af99ebb 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -609,10 +609,15 @@ static apr_bucket *find_end_sequence(apr_bucket *dptr, include_ctx_t *ctx, 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 {