Doing 10 million anything will take a lot of time. Again, make sure your hardware is up to the task. You can't expect high performance out of a desktop computer with a generic
IDE hard drive when you are parsing 10 gigs. Lots of memory (use Task Manager to monitor memory use), a fast processor (Pentium 4 2.6ghz are common now), and a fat IO pipe are essential (ATA100 IDE, SCSI, RAID, in order of increasing performance). You can justify spending money on hardware because spending time tweaking code costs money too. Not to mention slow app performance costs the whole company time and money.
As for buffering RandomAccessFile, I did a quick search for it and came up with
this article. It's for JDK version 1.0.2. That's ancient history. However, looking at the source code for RandomAccessFile (look in your SDK root dir for a src.zip file) you can see that readLine() reads char by char until it hits a '\n'. That's just plain slow so this approach may still be relevant.
I've seen this technique described as "custom buffering", for example, in
Java Platform Performance. That book also has good recommendations as to how to measure performance and performance improvements. You should use Hprof to get a benchmark for your app's performance, then try out these alternatives using Hprof to see which is the best solution.
Good luck!
[ July 29, 2004: Message edited by: Joe Ess ]