Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enumerate folders - Time needed
#2
It is normal on all Windows versions. Probably because of slow disk access, because file properties are stored there. Next time faster because of caching. Probably faster if using SSD drive.

QM uses Windows API FindFirstFile/FindNextFile. I also tested FindFirstFileEx with options FindExInfoBasic (no DOS filename) and FIND_FIRST_EX_LARGE_FETCH that are available on Win7+, but it makes only 30% faster. No other faster API exist.

Times on my Win10 computer with SSD:
Macro Macro2637
Code:
Copy      Help
out
PerfFirst
str sFolder="C:\*"
str sPath
Dir d
int n
;foreach(d sFolder FE_Dir 5)
foreach(d sFolder FE_Dir 6)
,sPath=d.FileName(1)
,out sPath
,n+1
PerfNext;PerfOut
out n
;n: 500974 files+folders, 92897 folders

;FindFirstFile:
;speed: 31608175  after reboot.   for files+folders (63 micros/file)
;speed: 11242001  later

;FindFirstFileEx(...FindExInfoBasic..FIND_FIRST_EX_LARGE_FETCH):
;speed: 19987875  after reboot
;speed: 6496472  later


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)