Ank Sri

Greenhorn
+ Follow
since Apr 09, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ank Sri

Not sure why would you do this because you again are passing the InputStream to all the threads which would again either process the bytes or the String by reading the Stream so why not just pass the String or the bytes to all the threads. That would definitely get you some performance gain and also would not create so many InputStream objects and thus help you keep your memory requirement low.
12 years ago
Olze, just wanted to check if you are closing the directory stream in the finally block. Also if that is there then you can take a heap dump and analyze it to see if there are any memory leaks in the application.
12 years ago
I think your problem is that possibly you are handling more files than your application can handle at a time. So you would need to limit the number of files you get into the memory at any time based on the memory you have with your VM. If your application needs are more than what can be handled by the VM then you can think of these two options
a. Increase the VM size. If you are using 32 bit VM you can not go beyond 3gb, so you would need to migrate to 64 bit VM
b. Other option is to cluster your application.

Hope this helps!!