divide and conquer - How to speed up applications using threads in java