Mark Kruger posted comments about the performance of
In a comment on Mark’s blog, Tom Jordahl pointed out that the reason for this is that for
Mark Kruger posted comments about the performance of
In a comment on Mark’s blog, Tom Jordahl pointed out that the reason for this is that for
This can be done on all versions of CFMX?
Hi,
Any chance of this being added to the documentation?
Cheers,
Tony
Andrea, I don’t know about CFMX, it is definitley in CFMX7.
Anthony, yes, it’ll be added, and is already in a note at the bottom of that page in LiveDocs.
— Ben
Does the listinfo attribute take a list of columns to return? If so, what columns can be returned w/out the stat() call being invoked?
Dan,
Right now it is NAME or ALL, as far as I know.
— Ben
I tested and this does not work on CFMX 6.1, only 7. Also, it looks like the only valid values are NAME and ALL. (Anything other than name appears to give you all the info.) It would be nice if you could include a list of columns as Dan suggests.
Well hopefully the cf team will add the other parameters to scorpio. It would be nice to give multiple parameters like name and size or something like that. Also a expanded filter would nice, eg <cfdirectory name="getImages" folder="C:images" filter=" *.jpg | *.gif | *.png " />
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…
Yes I have great interest in knowing if the filter attribute in cfdirectory will be expanded as Michael has suggested. For example, I currently use cfdirectory to automate some things in my application for me such as initializing my controllers (use cfdirectory to read and list my controllers directory) and initializing my models (simply reads the models directory). With that approach I’d like to do a little bit more with the filter other than *.cfc so I can filter out specific files, for example those that start with an underscore "_" or some familiar set of letters. Thanks though for this great post! All I’ve needed is to the name of the file and no other data so its nice to know I can speed it up now using the listinfo attribute. Thanks for sharing with us Ben!
Is there anyway that I can get just the NAME and DATELASTMODIFIED from cfdirectory?
Thanks
CJ
I have discovered that the use of the sort attribute of CFDirectory is a significant contributor to it’s poor response with large file lists (CFMX 6.1).
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.â€
Thanks though for this great post! All I’ve needed is to the name of the file and no other data so its nice to know I can speed it up now using the listinfo attribute.Anything other than name appears to give you all the info
Was just curious what all parameter LISTINFO could have that are as useful as this "name". By now, I am sure this is in documented info
—
Abhijeet
http://www.lifeiscolourful.com
Wow, that’s a good number of spam comments from various people. I am not sure if Ben is busy or something else, but I never saw this happening few months back
Leave a Reply