Browse Source
scandir by default sorts files in ascending order. this is unnecessary when you're picking a random file anyway. it's just wasting CPU cycles and increasing latency as more files are added. currently it is $files = scandir($dir); it should be $files = scandir($dir, SCANDIR_SORT_NONE);main
Majin Bejitto
2 years ago
committed by
-
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue