httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server request.c
Date Mon, 27 Aug 2001 04:37:41 GMT
wrowe       01/08/26 21:37:41

  Modified:    server   request.c
  Log:
    Further optimization to location_walk() and clean up unused variables.
  
    We will note the end result of the merge, and if remains the same through
    the second pass, we have nothing whatsoever to do :)
  
  Revision  Changes    Path
  1.34      +14 -5     httpd-2.0/server/request.c
  
  Index: request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/request.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- request.c	2001/08/27 04:29:09	1.33
  +++ request.c	2001/08/27 04:37:40	1.34
  @@ -962,7 +962,6 @@
   {
       core_server_config *sconf = ap_get_module_config(r->server->module_config,
                                                        &core_module);
  -    ap_conf_vector_t *per_dir_defaults = r->per_dir_config;
       ap_conf_vector_t *per_uri_defaults = NULL;
       ap_conf_vector_t **locations = (ap_conf_vector_t **) sconf->sec_url->elts;
       ap_conf_vector_t **loc_done = NULL;
  @@ -1060,21 +1059,31 @@
                                 apr_pool_cleanup_null, r->pool);
       }
       else {
  -        /* Well this looks familiar!  Get back our per_uri_defaults
  -         * from the last location walk.
  +        /* Well this looks familiar!  If our end-result (dir_merged) hasn't
  +         * changed, we have nothing to do :)
            */
  +        apr_pool_userdata_get(&per_uri_defaults, "ap_location_walk::dir_merged",
  +                              r->pool);
  +        if (per_uri_defaults == r->per_dir_config)
  +            return OK;
  +
  +        /* Well, we will need our per_uri_defaults from the last location walk. 
  +         * after all.
  +         */
           apr_pool_userdata_get(&per_uri_defaults, "ap_location_walk::dir_conf",
                                 r->pool);
       }
   
  -    /* We might be able to optimize further, if r->per_dir_config never changed. 
  -     * In any case, merge our per_uri_defaults onto 
  +    /* Merge our per_uri_defaults preconstruct onto the r->per_dir_configs,
  +     * and note the end result for later optimization.
        */
       if (per_uri_defaults)
           r->per_dir_config = ap_merge_per_dir_configs(r->pool,
                                                        r->per_dir_config,
                                                        per_uri_defaults);
   
  +    apr_pool_userdata_set(r->per_dir_config, "ap_location_walk::dir_merged", 
  +                          apr_pool_cleanup_null, r->pool);
       return OK;
   }
   
  
  
  

Mime
View raw message