From: "Bill Stoddard" <[EMAIL PROTECTED]>
Sent: Friday, November 09, 2001 10:42 AM


> FWIW, I see two stats rather than three to fetch c:/website/file500.html (an 
>improvement).
> 
> The first is:
> core_translate()
> apr_filepath_merge()
> apr_stat()
> 
> The second is:
> core_map_to_storage()
> apr_lstat()
> apr_stat()
> 
> Haven't dug into the code but is there a safe way to eliminate the filepath_merge or 
>is
> this something required on Windows (in which case perhaps the results can be cached).

For your 'reassurance', yes, both are required short of a near-total rewrite.

We don't need to use TRUENAME in the merge call, provided that canonical_name
isn't set [therefore, we won't 'trust' the name.]  So the name would be stat'ted
anyways, later.

The single 'stat' trigger actually tests the symlink target.  We have to discover
the actual file if unix will have only one stat.  Since the 'target' has no file 
name (it's a file node, not a dirent), only an lstat may ever pick up the true file 
name on case-insensitive/aliasing platforms.

This would take major re-engineering, to have core_translate and other modules not
only call apr_filepath_merge to get the true name, but also set aside its _lstat_
results for later reuse in dir_walk.

Bill

Reply via email to