I just wanted to know if anyone else had performance problems associated with looping through the Files Collection of the Project Object in VFP6. This code works, but is EXTREMELY slow. I've got about 600 files in my project and it takes over 1 second to process this loop one time. Just open any VFP6 project onto the desktop and run this code in a prg.
WITH _VFP.Application.ActiveProject
nFileCount = .Files.Count
? alltr(str(nFileCount)) + " total files in the project."
FOR nCount = 1 TO nFileCount
nTime = seconds()
set message to "File=" + .Files.Item(nCount).Name
? "Loop Time=" + alltr(str(seconds() - nTime,10,6))
ENDFOR
ENDWITH
I know VFP has problems with enumerations (FOR EACH - see
http://members.home.net/bmassi/gotchas.htm) and if I use it here instead of the FOR..NEXT loop then VFP stops responding.
I'm starting to wonder about VFP and its handling of collections. I'm begining to think we've got a problem.