ASF Bugzilla – Attachment 26073 Details for
Bug 50002
Restart with many vhosts taking forever [patch]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that kind-of fixes this issue
restart.patch (text/plain), 1.56 KB, created by
GDR!
on 2010-09-25 05:04:10 UTC
(
hide
)
Description:
Patch that kind-of fixes this issue
Filename:
MIME Type:
Creator:
GDR!
Created:
2010-09-25 05:04:10 UTC
Size:
1.56 KB
patch
obsolete
>diff --git a/include/util_cfgtree.h b/include/util_cfgtree.h >index 4da4c7d..bf934f1 100644 >--- a/include/util_cfgtree.h >+++ b/include/util_cfgtree.h >@@ -64,6 +64,14 @@ struct ap_directive_t { > const char *filename; > /** The line number the directive was on */ > int line_num; >+ >+ /** GDR!'s hack >+ * This is supposed to act as a cache for ap_build_config >+ * in the first node on a given tree leaf, it keeps last known >+ * non-NULL list element. This way we don't have to traverse >+ * whole tree >+ */ >+ struct ap_directive_t *last; > }; > > /** >diff --git a/server/config.c b/server/config.c >index dc9b3b6..dd4498e 100644 >--- a/server/config.c >+++ b/server/config.c >@@ -1285,12 +1285,35 @@ AP_DECLARE(const char *) ap_build_config(cmd_parms *parms, > char *l = apr_palloc (temp_pool, MAX_STRING_LEN); > const char *errmsg; > >+ /** GDR!'s hack >+ * Instead of iterating whole level of leafs, jump to >+ * last known non-NULL leaf >+ */ >+ ap_directive_t **leaf_cache = NULL; >+ >+ if(current) { >+ leaf_cache = &(current->last); >+ >+ if(leaf_cache && *leaf_cache) { >+ current = *leaf_cache; >+ } >+ } >+ /* End hack */ >+ > if (current != NULL) { > while (current->next) { > current = current->next; > } > } > >+ /** GDR!'s hack >+ * Update last known leaf >+ */ >+ if(leaf_cache) { >+ *leaf_cache = current; >+ } >+ /* End hack */ >+ > while (!(ap_cfg_getline(l, MAX_STRING_LEN, parms->config_file))) { > errmsg = ap_build_config_sub(p, temp_pool, l, parms, > ¤t, &curr_parent, conftree);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 50002
: 26073