I manage a site with nearly 50GB of small PDFs. Thousands of directories and files. This makes CFFM super duper slow. I know it sounds silly, but when staring at a blank window, 15 seconds feels like 15 minutes. The problem is that with every page load, the entire directory tree below your initial directory is read. Crazy. Here is the fix…
At around line 648 of cffm.cfm, only turn on recursion if this particular action requires it:
<cfset variables.listAllFiles = cffm.directoryList(cffm.includeDir, (isdefined("url.action") and url.action eq 'copymoveForm'))>
… which is, when moving or copying. In my application, speed increased 10x.
And to get a little more speed when listing a directory with images…
At around line 67 of cffm.cfm, turn off image sizes:
<cfinvokeargument name="enableImageDimensionsInDirList" value="true">