Consider limiting the number of strings generated by the split method. There is a split overload that takes such maximum number. A system error may send you 2MB string containing only '.' and this code will generate 2M objects.