summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-12-15 13:23:34 +0100
committerAnatol Belski <ab@php.net>2017-12-15 13:23:34 +0100
commitf3f6cd24e9677c820f198f3804d6c9a932685373 (patch)
treeefa5dea154db468a6b7d33c85ce6db3e5c61f093 /TSRM/tsrm_win32.h
parent66a604171cc676ebc8cb717437f6b9cd589d3d24 (diff)
downloadphp-git-f3f6cd24e9677c820f198f3804d6c9a932685373.tar.gz
Modernize realpath and integrate quick variant into virtual_file_ex
The slower I/O as a traditional bottleneck on Windows which is the target of this patch. The recursive path resolution, while being an allround solution, is expensive when it comes to the common case. Files with proper ACLs set can be resolved in one go by usage of specific API. Those are available since Vista, so actually can be called old. Those simpler api is used for the cases where no CWD_EXPAND is requested. For the cases where ACLs are improper, the existing solution based on FindFirstFile still does good job also partially providing quirks. Cases involing reparse tags and other non local filesystems are also partially server by new APIs. The approach uses both APIs - the quick one for the common case still integrating realpath cache, and the existing one as a fallback. The tests show the I/O load drop on the realpath resolution part due to less system calls for the sub part resolution of paths. In most case it is justified, as the sub parts were otherwise cached or unused as well. The realpath() implementation in ioutil is also closer to the POSIX.
Diffstat (limited to 'TSRM/tsrm_win32.h')
-rw-r--r--TSRM/tsrm_win32.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h
index b90791cd59..3edef1dd58 100644
--- a/TSRM/tsrm_win32.h
+++ b/TSRM/tsrm_win32.h
@@ -110,8 +110,6 @@ TSRM_API int shmget(key_t key, size_t size, int flags);
TSRM_API void *shmat(int key, const void *shmaddr, int flags);
TSRM_API int shmdt(const void *shmaddr);
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
-
-TSRM_API char *realpath(char *orig_path, char *buffer);
#endif
/*