weren't we going to do something similiar to this in 2.1 for the default file handler? (replace the 'stat' with a 'fstat')
Will .. do you remember the whole details? it was something about putting the handle into the request_rec or something
-------- Original Message -------- Subject: cvs commit: httpd-test/specweb99/specweb99-2.0 mod_specweb99.c Date: 19 Nov 2003 20:55:58 -0000 From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: Holsman.NET Newsgroups: server.http.apache.testing.cvs
gregames 2003/11/19 12:55:58
Modified: specweb99/specweb99-2.0 mod_specweb99.c Log: customadscan: use apr_file_info_get (a.k.a fstat) rather than apr_stat for about a 7% improvement in conforming connections.
The box is an aging RS/6000 with a single 375 MHz ppc604e, .5G of RAM, AIX 5.2
Revision Changes Path 1.30 +3 -3 httpd-test/specweb99/specweb99-2.0/mod_specweb99.c
Index: mod_specweb99.c =================================================================== RCS file: /home/cvs/httpd-test/specweb99/specweb99-2.0/mod_specweb99.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -b -u -r1.29 -r1.30 --- mod_specweb99.c 7 Aug 2003 21:21:57 -0000 1.29 +++ mod_specweb99.c 19 Nov 2003 20:55:58 -0000 1.30 @@ -882,11 +882,11 @@ X = apr_psprintf(r->pool, "%1d", (adid % 36) / 9); Y = apr_psprintf(r->pool, "%1d", adid % 9);
- if ((rv = apr_stat(&s, fname, APR_FINFO_SIZE, r->pool)) != APR_SUCCESS)
- return;
-
rv = apr_file_open(&f, fname, APR_READ, APR_OS_DEFAULT, r->pool);
if (rv != APR_SUCCESS)
+ return;
+
+ if ((rv = apr_file_info_get(&s, APR_FINFO_SIZE, f)) != APR_SUCCESS)
return;
len = s.size;