1st discovery: cfdirectory (or directory inside script) runs 20x faster than directoryList … what gives?
Example code below.
2nd observation: I cannot use the result with .each( reading each file and setting parallel to true ) to thread these quickly. Parallel actually slows processing down vs serial. Are file READ operations always locked (cannot be threaded) or am I bumping into a possible environment issue?
In further tests and trying various versions of 5.3.8.x / 5.3.9.x I’m still seeing a measurable difference. The absolute of 20x may have been a poor title as the difference depends on many factors.
Wow, if I were to bet, it’s related to how much data that function/tag gets about each file by default. There are a handful of tickets in Lucee’s backlog about this sort of thing. It’s one of the things that makes working with large dirs in CFML slower than Java because Lucee loops over every file to get details on then to build up its list, even if you never use that data.