Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enumerate folders - Time needed
#1
I use a rather simple code to enumerate folders under a root directory, which it contains about 5000 sub-folders. The first time this code is run after booting-up it takes about 150s (seconds). Every consequent run takes only 1-2 s. I understand it has something to do with XP. Any explanation and/or advice to avoid this annoying delay is most welcome. Best regards.

Function tempf07
Code:
Copy      Help
long t1 t2 dt
t1=perf ;;get time before
str sFolder="S:\Sdoc\*"
str sPath
Dir d
foreach(d sFolder FE_Dir 5)
,sPath=d.FileName(1)
,out sPath
t2=perf ;;get time after
dt=t2-t1 ;;display the difference
out F"{dt}"


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)