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

[eluser]Unknown[/eluser]
Hi, I have made a little function that deletes files based on date. Prior to doing the deletions, it lets the user choose how many days/months back to delete files, telling them how many files and how much memory it would clean up.

It worked great in my test environment, but when I attempted to test it on a larger directory (approximately 100K files), it hangs.

I've stripped out everything else from my code to ensure that it is the get_dir_info() function that is causing the issue.

Code:
$this->load->helper('file');
$folder = "iPad/images/";
set_time_limit (0);
echo "working<br />";
$dirListArray = get_dir_file_info($folder);
echo "still working";

When I run this, the page loads for approximately 60 seconds, then displays only the first message "working" and not the following message "still working".

It doesn't seem to be a system/php memory problem as it is coming back after 60 seconds and the server respects my set_time_limit() as I've had to use that for other processes.

Is there some other memory/time limit I might be hitting that I need to adjust?





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