.NET ElasticLowLevelClient 7.4.1 serializer extremely slow

Hi,

I recently switched from ES 6.8.5 to 7.4.2. I noticed that bulk loading became extremely slow. I narrowed down the problem to the .NET's ElasticLowLevelClient serialization.

For example, serializing the following code 100K times in ES 6 takes ~1 second where as in ES 7 takes about 70 seconds (!!). As I have millions of records, this becomes a real problem.

var o = es.Serializer.SerializeToString(new
{
    index = new
    {
        _index = indexName,
        _id = session.SESSION_ID
    }
}, SerializationFormatting.None);

I also tried using MemoryStreamFactory.Default for the serialization but results are the same.

When the serialized class is bigger, the performance is even worse.

Currently I temporarily (?) switched to Newtonsoft JSON and the results are satisfying.
Can you please advise? Is there anyway to get the previous serializer or its performance?

Thanks.