Mark Kruger posted comments about the performance of <CFDIRECTORY ACTION="list"> (see post 1 and post 2). He noted that returning full directory information with all file details (especially over network connections) can be painfully slow. As per his post, using Java APIs to return directory lists is far quicker, which is odd as <CFDIRECTORY ACTION="list"> actually uses the same Java APIs internally.
In a comment on Mark's blog, Tom Jordahl pointed out that the reason for this is that for <CFDIRECTORY> to return all file details it needs to first retrieve the file list and then perform a Java stat() for each file, and that stat() call is very time consuming (especially over network connections). The solution, if you just need file names and not other details, is to use the undocumented LISTINFO attribute. LISTINFO defaults to "all", but specify LISTINFO="name" and <CFDIRECTORY> will only return file names and will run just as quickly as the Java APIs it relies on.
Any chance of this being added to the documentation?
Cheers,
Tony
Anthony, yes, it'll be added, and is already in a note at the bottom of that page in LiveDocs.
--- Ben
Right now it is NAME or ALL, as far as I know.
--- Ben
I'm not thinking any of this will be released in any hotfix... Or maybe they will... Ben??
btw, you got some comment spam up here...
Thanks
CJ
If you need to sort a large CFDirectory listing, you may find a very significant improvement if you...
- CFDirectory but do NOT use the sort attribute.
- Do a Query of Query on the CFDirectory results and sort within the Q of Q.
- Do not use SELECT * in the Q of Q. Only select the fields you need such as the file Name and Date.
- If you need to filter the results, it can be done in the same Q of Q.
Be sure to test both ways and see which is better. (We had a 10 times faster response in one case.)
(Reminder: CFDirectory results are stored as a Query object in memory.)
The above is a "CF only" workaround using documented calls (as compared to some of the known JAVA workarounds).
Hope This helps some folks!
Bruce L. Jacobs
“The comments and opinions expressed are my own
and do not represent the views of United Space Alliance.”
---
Abhijeet
http://www.lifeiscolourful.com
http://suzannefrank.domaingler.com/nursing7870.htm...
http://tompierce.justfree.com/nursing6612.html
http://stephaniemorales.hostedwith.us/nursing5346....
http://fasterwq.aokhost.com/debt7574.html
http://fasterwq.hothostcity.com/debt159.html
http://stephaniemorales.hostedwith.us/nursing7134....
http://suzannefrank.domaingler.com/debt5666.html
http://fasterwq.domaingler.com/debt9753.html
http://billyadams.hostedwith.us/nursing1915.html
http://gitertt.domaingler.com/nursing9563.html
http://cherylcutting.gigazu.com/nursing7321.html
http://richardpaige.seitenclique.net/nursing5528.h...
http://gitertt.sitebooth.com/debt6764.html
http://gitertt.gigazu.com/debt4884.html
http://beverlyjenkins.domaingler.com/debt9934.html...
http://karteman.strefa.pl/nursing8835.html
http://karteman.strefa.pl/nursing7673.html
Hospital, nursing jobs in philadelphia, nursing jobs, nurse, nursing jobs in pa, nursing recruitment, hospital nursing, working at jefferson, phildelphia nurse.
http://karteman.110mb.com/nursing2225.html
http://karteman.110mb.com/nursing3575.html
http://karteman.strefa.pl/nursing843.html
http://kartwoman.hit.bg/nursing1322.html
http://www.kartmapus.happyhost.org/nursing6940.htm...
http://kartmapus.007sites.com/nursing4838.html
Hospital, nursing jobs in philadelphia, nursing jobs, nurse, nursing jobs in pa, nursing recruitment, hospital nursing, working at jefferson, phildelphia nurse.
http://kartograf.110mb.com/nursing7067.html
http://karteman.900megs.com/nursing3815.html
http://karteman.700megs.com/nursing4335.html
http://karteman.110mb.com/nursing250.html