Bug #78094 [NEW]: File Search Problem Excessive Time
| From: | dpfender44 at gmail dot com | Date: | Fri, 31 May 2019 17:09:43 +0000 |
| Subject: | Bug #78094 [NEW]: File Search Problem Excessive Time | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221067@lists.php.net to get a copy of this message | ||
From: dpfender44 at gmail dot com
Operating system: Windows 10
PHP version: Next Major Version
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:File Search Problem Excessive Time
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 bug report at https://bugs.php.net/bug.php?id=78094&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78094&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78094&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78094&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78094&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78094&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78094&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78094&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78094&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78094&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78094&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78094&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78094&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78094&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78094&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78094&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78094&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78094&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78094&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78094&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78094&r=mysqlcfg