10-05-2009 01:53 PM
I am currently running an application that scans data in a text files for outliers. After each file is scanned, statistics data stored in a database (if there are outliers); so at least the memory in the computer will not be eaten up. In order to scan lines of data without killing the computer, I put a 1 millisecond delay in the scanning loop. I have massive amounts of data in thousands of files to scan. Taking one milisecond per line of data is taking too much time. At this rate, it will take over a WEEK to scan all the data! Is there anything I can do to minimize the time per line scan? If anybody knows, I need a solution. If anybody thinks or knows there is NO solution, I need to hear that feedback too!
10-05-2009 02:07 PM
why dont you post what you already have tried and lets see if we can help improve. not knowing how you are doing things really hinders how much we can help.
10-05-2009 02:42 PM
10-05-2009 03:23 PM
Also, a quick thing you can try is to put a 0 millisecond delay in the loop instead of 1. This does actually do something. It will yield the processor to other operations that are requesting to run, which keeps your system from locking up. However, it won't force the system to wait any specific amount of time, meaning you could speed up your processing.
I do agree, however, that processing the data in chunks is probably the best option.
10-05-2009 03:26 PM - edited 10-05-2009 03:27 PM
Mark:
That gives me good food for thought. I'll try that and report back.
10-05-2009 03:30 PM
Jarod:
0 milliseconds....Cool! I'll try that too!
10-05-2009 03:31 PM