Bug #78094 [Opn->Fbk]: File Search Problem Excessive Time
| From: | ab@php.net | Date: | Sat, 01 Jun 2019 11:14:58 +0000 |
| Subject: | Bug #78094 [Opn->Fbk]: File Search Problem Excessive Time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221072@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78094&edit=1
ID: 78094
Updated by: ab@php.net
Reported by: dpfender44 at gmail dot com
Summary: File Search Problem Excessive Time
-Status: Open
+Status: Feedback
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Windows 10
PHP Version: Next Major Version
Block user comment: N
Private report: N
New Comment:
Thanks for the report. Could you please reduce the repro snippet to the absolutely required lines,
only Windows related, only issue related?
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2019-05-31 17:09:43] dpfender44 at gmail dot com
Description:
------------
My function scan_dir() uses opendir(), chdir(), readdir(), is_dir(), closedir() to scan for files on
the server.
PHP version 7.4.0-dev does the same scan as version 7.3.6 but takes about 100 times longer.
This is all done on the same server, but just switching between PHP versions on 5/31/19.
The extra time seems to be spent doing readdir().
Test script:
---------------
http://djpsrc.djpnet.dyndns.org/test_scan_dir.php.txt
Expected result:
----------------
PHP version 7.3.6
Operating System Microsoft Windows [Version 10.0.17763.503]
File search types: .mp4|.webm|.mp3|.wav|.mid|.txt
Units of seconds (Unix timestamp from microtime()):
Start file search time (1559247589.134)
End file search time (1559247589.1699)
Elapsed time (0.035879135131836)
Resulting file match count (777)
Actual result:
--------------
PHP version 7.4.0-dev
Operating System Microsoft Windows [Version 10.0.17763.503]
File search types: .mp4|.webm|.mp3|.wav|.mid|.txt
Units of seconds (Unix timestamp from microtime()):
Start file search time (1559320102.0205)
End file search time (1559320105.3702)
Elapsed time (3.3497362136841)
Resulting file match count (777)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78094&edit=1