in reply to Reading from file in threaded code is slow
As other monks have shown, the primary problem with your code is disk contention. You also say that your code is cpu bound. What I would do is handle all file IO in one thread and hand the data off to multiple threads to process.
|
|---|