Previous (and current implementation) parses Set-Cookie header to add new cookies to it. I don't think performance has ever been an issue here.