When I first read your question, I was going to offer you to comment on the proc () call, and then use some other answers to speed up the reading of the file (this should be the whole run time because you commented on the processing call).
For further thought, I suggest you use a profiler (without any lines). If you use Eclipse, there are several JVM profilers on the Eclipse Marketplace, and I'm sure there are profiles integrated into another development environment. Profilers can show you the hot spots in your code - places where you seem to be most of the time. This information, plus your knowledge of program logic, will lead to ways to accelerate the worst bottlenecks.
It is an iterative process with best and best results.
I also recommend that you first use a much smaller sample file for your testing.
source share