in reply to Processing large file using threads
I hope you don't literally mean days ... for 21,000,000 lines it would take you more than 57,000 years (57494.8 years) to process the file. Once.
Having said that, it's not clear that you would benefit from using threads. You would still need to send the data in each line to the thread doing the processing, and then collect the result(s) from that thread afterwards, and since you've now got multiple threads each vying for the CPU, it's quite possibly going to be even slower than a single process working on it. Depending on what exactly you're doing, of course.
Having said that, can you explain a little further exactly what processing you're trying to do on each line (and how long it actually takes)?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Processing large file using threads
by mjacobson (Initiate) on May 08, 2007 at 15:32 UTC | |
by Joost (Canon) on May 08, 2007 at 18:13 UTC | |
by clinton (Priest) on May 08, 2007 at 16:30 UTC | |
by zentara (Cardinal) on May 08, 2007 at 16:44 UTC | |
by renodino (Curate) on May 08, 2007 at 21:02 UTC |