]> granicus.if.org Git - apache/commitdiff
buffer .var maps to avoid asking the kernel for one byte at a
authorJeff Trawick <trawick@apache.org>
Fri, 24 Aug 2001 03:04:44 +0000 (03:04 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 24 Aug 2001 03:04:44 +0000 (03:04 +0000)
time

note that a system trace of .var map processing still shows an
extra read() after we hit EOF the first time; we could make
use of the EOF flag in APR to avoid the read() or play with
mod_negotiation

Suggested by: Marc Slemko

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90609 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_negotiation.c

index 4c11f397ce045c3fec6040a88c684dbc174fc423..cc69acf463a103a33dddba765fb8c85ecee801c5 100644 (file)
@@ -854,7 +854,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg, request_rec *
     /* We are not using multiviews */
     neg->count_multiviews_variants = 0;
 
-    if ((status = apr_file_open(map, rr->filename, APR_READ,
+    if ((status = apr_file_open(map, rr->filename, APR_READ | APR_BUFFERED,
                 APR_OS_DEFAULT, neg->pool)) != APR_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
                       "cannot access type map file: %s", rr->filename);