Skip to content

Commit 6ec4056

Browse files
committed
Fix #79008: General performance regression with PHP 7.4 on Windows
We no longer try to retrieve the filename of a given stream when fstat'ing, because this is very slow. Since we neither didn't do that in PHP 7.3 and earlier, we regard this as sensible trade-off.
1 parent d5c55f8 commit 6ec4056

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ PHP NEWS
1212
"static"). (Nikita)
1313
. Fixed bug #78999 (Cycle leak when using function result as temporary).
1414
(Dmitry)
15+
. Fixed bug #79008 (General performance regression with PHP 7.4 on Windows).
16+
(cmb)
1517

1618
- Fileinfo:
1719
. Fixed bug #74170 (locale information change after mime_content_type).

win32/ioutil.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -867,16 +867,6 @@ static int php_win32_ioutil_fstat_int(HANDLE h, php_win32_ioutil_stat_t *buf, co
867867

868868
data = !dp ? &d : dp;
869869

870-
if (!pathw) {
871-
pathw_len = GetFinalPathNameByHandleW(h, mypath, MAXPATHLEN, VOLUME_NAME_DOS);
872-
if (pathw_len >= MAXPATHLEN || pathw_len == 0) {
873-
pathw_len = 0;
874-
pathw = NULL;
875-
} else {
876-
pathw = mypath;
877-
}
878-
}
879-
880870
if(!GetFileInformationByHandle(h, data)) {
881871
if (INVALID_HANDLE_VALUE != h) {
882872
/* Perhaps it's a fileless stream like stdio, reuse the normal stat info. */

0 commit comments

Comments
 (0)