]> granicus.if.org Git - apache/commitdiff
Performance death notices. Note that we shouldn't have EVER coded a
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 23 Aug 2001 18:56:13 +0000 (18:56 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 23 Aug 2001 18:56:13 +0000 (18:56 +0000)
  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

modules/experimental/mod_disk_cache.c

index 8b5b60cf22bae273e350bff3b2cf4855d2ec4f82..b2d54bcb6150c0e10aa9cc742964cf7ac3a00312 100644 (file)
@@ -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,