Hi Robert! Is there any way you could read in the file names into a stringlist, sort the stringlist and then do the locate? I think it would help if you could give us a sample of your code to critique.
One of your problems is to determine what is slowing down the process. Is it the reading of the file names or is it the database search? Tom Nesler Live long!... Code Well!... and Prosper!... V -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 8:18 AM To: [email protected] Subject: Slowing down in loop i have an app that has to update two table with pdf files from directories. There are about 900 files in one Dir and about 3000 in the other. I have to check if each file is in the table if not add it. This requires 3000 searches on the table but as the app progresses it slows down to a crawl. Anybody have any ideas?. I have to add to this the revers for deleted files, so I really could do with speeding up the loop. The list below is the milliseconds it takes to do 100 hundred records. There are no updates in the trimmings just locates bob Pointon ====================================== IPACTA_TRIALS_PDFS 0 109 203 266 328 500 531 610 ====================================== IPACTA_LABELS_PDFS 0 110 297 250 328 422 578 579 718 750 813 937 1000 1063 1094 1250 1328 1406 1453 1516 1578 1718 2047 1907 1875 2031 2032 2187 2250 2344 2406 _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

