Using String.reserve() to prevent memory fragmentation