From 7c0f2bd6a15fa7312eaafd6b0b2f89b57a6de67f Mon Sep 17 00:00:00 2001 From: Brian Pane Date: Sun, 17 Mar 2002 06:31:22 +0000 Subject: [PATCH] Another optimization for find_end_sequence: once we're in the middle of parsing a tag, consume the entire tag in a quick loop, rather than jumping back to the outer state-machine loop for each character git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93979 13f79535-47bb-0310-9956-ffa450edef68 --- modules/filters/mod_include.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 7ae98c2fea..8476b75b4e 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -626,7 +626,12 @@ static apr_bucket *find_end_sequence(apr_bucket *dptr, include_ctx_t *ctx, } } else if (ctx->state == PARSE_TAG) { - ctx->tag_length++; + const char *tmp = c; + do { + c++; + } while ((c < buf + len) && (*c != *str)); + ctx->tag_length += (c - tmp); + continue; } else { if (ctx->parse_pos != 0) { -- 2.40.0