performance fix for files with long lines