dotnet / dotnet/wcf

Updating app to .net core has dramatically slowed down it's interaction with a WCF service

Open
#5,271 6 comments 0 reactions 1 assignee Claimed by @mconnew View on GitHub
triaged
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

We have a desktop application which uses a library of ours which wraps a client to a WCF service (using NetTcpBinding bindings) we have deployed internally. I recently updated this desktop application to .net 7 (from .net framework 4.8.1). The intermediary library and client are .net standard 2.0, and the service is .net framework 4.8.1 (I get this is a mismatch, if this seems the likely culprit, do let me know).

The .net framework version of the desktop app used the service very smoothly, but since updating, when making a large number of calls, the first calls seem to be extremely slow, then when they return results, the remaining are reasonably quick. I've separated the areas of code into a simple console app to try reproduce the behaviour. This app creates 50 objects, which all asynchronously load something from the service, which in turn creates some other objects to load some more items from the service, this is mimicking some behaviour in the desktop app. Simple actions such as moving the triggering of the second set of objects/loads to the same task as loads the first set can see the total time to load everything increase from ~4s to ~20s, and monitoring the time to process each result, sees a low initial throughput followed by higher throughput once they are cleared.

I set up a batch script repeatedly calling netstat on the service machine, filtering by my machine name, and the number of active connections seems dramatically higher in the .net 7 version than the .net framework version running the same code?

Is the .net 7 app/client simply creating higher throughput on the server and bottlenecking it? Or has the behaviour changed somewhat in the newer versions of .Net?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.