summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-12-20 16:23:32 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2019-12-20 16:28:11 +0100
commit6ec40569281e2c392dd14da00319bd10d1c5d3d6 (patch)
tree3c2bf4f59b2cfd67f8e98fd200592a0f64926fe1
parentd5c55f81ec0d2290a2f4309d6b2aad2cd4cf7da9 (diff)
downloadphp-git-6ec40569281e2c392dd14da00319bd10d1c5d3d6.tar.gz
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.
-rw-r--r--NEWS2
-rw-r--r--win32/ioutil.c10
2 files changed, 2 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index f927b4ee3d..a3788adaca 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ PHP NEWS
"static"). (Nikita)
. Fixed bug #78999 (Cycle leak when using function result as temporary).
(Dmitry)
+ . Fixed bug #79008 (General performance regression with PHP 7.4 on Windows).
+ (cmb)
- Fileinfo:
. Fixed bug #74170 (locale information change after mime_content_type).
diff --git a/win32/ioutil.c b/win32/ioutil.c
index ce4fc9b65c..63645314dd 100644
--- a/win32/ioutil.c
+++ b/win32/ioutil.c
@@ -867,16 +867,6 @@ static int php_win32_ioutil_fstat_int(HANDLE h, php_win32_ioutil_stat_t *buf, co
data = !dp ? &d : dp;
- if (!pathw) {
- pathw_len = GetFinalPathNameByHandleW(h, mypath, MAXPATHLEN, VOLUME_NAME_DOS);
- if (pathw_len >= MAXPATHLEN || pathw_len == 0) {
- pathw_len = 0;
- pathw = NULL;
- } else {
- pathw = mypath;
- }
- }
-
if(!GetFileInformationByHandle(h, data)) {
if (INVALID_HANDLE_VALUE != h) {
/* Perhaps it's a fileless stream like stdio, reuse the normal stat info. */