splicing lines one by one is slow for large arrays