Is the extra query here needed? 

I the old implementation was using get_descendants to build _up all_files_ variable. Now at least an extra query is introduced. Now knowing the gruesome details it looks like the old impl. for _all_files_ was faster?! 

Care to explain the reason behind the change?