Does MultiThreading in Java takes much time for task completion?
Posted
by Geeta
on Stack Overflow
See other posts from Stack Overflow
or by Geeta
Published on 2010-05-17T13:46:12Z
Indexed on
2010/05/17
14:00 UTC
Read the original article
Hit count: 214
java
|multithreading
I have to search for a string in 10 large size files (in zip format 70 MB) and have to print the lines with the search string to corresponding 10 output files.(i.e. file 1 output should be in output_file1...file2---> output_file2). The same program takes 15 mins for a single file. But if use 10 threads to read 10 files and to write in 10 different files it should complete in 15 mins but its taking 40 mins.
How can I solve this. Or multithreading will take this much time only?
© Stack Overflow or respective owner