I have a webapp written in C#, based on ASP.NET.
It loads (with
LoadLibraryEx) an unmanaged DLL written with C++Builder.
As I have performance issues I made some tests and comparisons, running always the same method in the DLL, for many times, obtaining average times.
I discovered that the DLL:
- loaded by a C++Builder console application, takes: 4.922 s
- loaded by a C# console application, takes: 5.484 s
- loaded by a minimal C# ASP.NET application hosted on IIS 7.5, takes: 9.551 s
As you see case 1 and 2 have very similar performance.
Why case 3 is so slow? Maybe IIS slows down the DLL?
Is there any suggested IIS tuning?
Is there any suggested fast alternative to IIS for hosting ASP.NET webapps?
Should I consider porting the webapp to C++Builder?
I tried to migrate my webapp to ASP.NET Core (instead of .NET Framework) and run it on Kestrel. It takes 6.042 seconds. So, not so much overhead compared to the console app.
It seems that IIS is the culprit… why?