From: William A. Rowe Jr Date: Thu, 23 Aug 2001 18:56:13 +0000 (+0000) Subject: Performance death notices. Note that we shouldn't have EVER coded a X-Git-Tag: 2.0.25~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62feef213fecb6aafd5c2c1484a7c4381abf9fc3;p=apache Performance death notices. Note that we shouldn't have EVER coded a module with a fixed path ... the config phase should take the proxy/ path and ap_server_root_relative() it at startup. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90564 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_disk_cache.c b/modules/experimental/mod_disk_cache.c index 8b5b60cf22..b2d54bcb61 100644 --- a/modules/experimental/mod_disk_cache.c +++ b/modules/experimental/mod_disk_cache.c @@ -76,6 +76,7 @@ static int disk_serve(request_rec *r) char str[256]; apr_off_t offset = 0; + /* XXX Very expensive!!! */ filename = ap_server_root_relative(r->pool, apr_pstrcat(r->pool, "proxy", r->uri, NULL)); if ((rv = apr_file_open(&fd, filename, APR_READ, @@ -124,11 +125,13 @@ static int disk_cache(request_rec *r, apr_bucket_brigade *bb, void **cf) } if (ctx->filename == NULL) { apr_status_t rv; + /* XXX Very expensive!!! */ apr_dir_make(ap_server_root_relative(r->pool, "proxy"), APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE, r->pool); /* currently, we are using the uri as the cache key. This is * probably wrong, but it is much better than a hard-coded filename. */ + /* XXX Very expensive!!! */ ctx->filename = ap_server_root_relative(r->pool, apr_pstrcat(r->pool, "proxy", r->uri, NULL)); if ((rv = apr_file_open(&ctx->fd, ctx->filename,