It takes 2 hours to process the entire file.
50 GB / 2 hours is approximately 7 MB / s. This is not a bad course at all. A good (modern) hard drive should be able to support higher speeds continuously, so maybe your bottleneck is not I / O? You are already using BufferedReader, which, like the name, talks about buffering (in memory) what it reads. You could experiment with creating a reader with a slightly larger buffer than the default size (8192 bytes), for example:
BufferedReader br = new BufferedReader( new InputStreamReader(new FileInputStream("FileName")), 100000);
Please note that with a default buffer of 8192 bytes and a bandwidth of 7 MB / s, BufferedReader is about to refill its buffer almost 1000 times per second, so lowering this number can really help to reduce some overhead. But if the processing you do, instead of I / O, is a bottleneck, then no I / O trick will help you. Perhaps you should consider making it multithreaded, but whether it can be done and how it depends on what βprocessingβ means here.
Joonas pulakka
source share