Here below is what I was running, 

<!--- this is a shared network drive, unix folder actually --->
<cfset directoryname="\\jwoc\units\data\units">

<cfset tstart=gettickcount()>
<cfdirectory action="list" name="getinfo" directory="#directoryname#">
<cfset tend=gettickcount()>
<cfoutput>#(tend-tstart) * .001# seconds - #getinfo.recordcount# 
records</cfoutput>

<cfset tstart=gettickcount()>
<cfset 
thefiles=createobject("java","java.io.File").init("\\jwoc\units\data\units").list()>
<cfset tend=gettickcount()>
<cfoutput>#(tend-tstart) * .001# seconds - #ArrayLen(thefiles)# 
records</cfoutput>

And the output is:

79.342 seconds - 1462 records 1.078 seconds - 1462 records 

Such a difference in performance, I don't understand.. I know cfdirectory 
brings lots more info than just the file name strings, but still I think it is 
too much of a slowness issue. what do y'all think? How is cfdirectory 
implemented?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249913
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to