Welcome Guest, Not a member yet? Register   Sign In
get_dir_file_info() hangs when run on a large directory
#2

[eluser]CroNiX[/eluser]
Not sure how to solve your exact problem there, but wouldn't it be much simpler to just store the filename, filesize and the upload date in a datebase and then query the database and use the filenames as the ones to delete? There's an awful lot of overhead in what you're doing, and it will only take longer and longer and require more memory as the number of files in the dir grow since you have to scan each file individually to check it's filedate/last modified time. A db query combined with deleting the files would take tenths of a second or so no matter how large the dir is.


Messages In This Thread
get_dir_file_info() hangs when run on a large directory - by El Forum - 12-01-2013, 03:17 PM
get_dir_file_info() hangs when run on a large directory - by El Forum - 12-01-2013, 05:38 PM
get_dir_file_info() hangs when run on a large directory - by El Forum - 12-01-2013, 09:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB