Improve proftable performance

Change readLine() to scan().