Improved readLine performance