Skip to content

HttpClient formulas performance #670

Answered by govert
schebotar asked this question in Q&A
Discussion options

You must be logged in to vote

There are a few things you can do to improve the performance in the Excel / Excel-DNA side. But I suspect the biggest problem is in the number of concurrent calls made through the HttpClient.

So, the first thing to try is to make sure you are setting the maxConcurrentConnections for the HttpClient. This depends on whether you are targeting .NET Framework 4.x or .NET 6. You should also Google about this a bit.

I presume you are targeting .NET Framework 4.x - I think the default value is 2 and you would set it like this, maybe in your AutoOpen?

        ServicePointManager.SecurityProtocol =
            SecurityProtocolType.Tls12;
        // Set the connection limit for all new ServicePoints…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by schebotar
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants