improve line break removal performance