dsbenghe / Novell.Directory.Ldap.NETStandard

.NET LDAP client library for .NET Standard >= 2.0, .NET Core >=1.0, NET5/NET6/NET7/NET8 - works with any LDAP protocol compatible directory server (including Microsoft Active Directory).
MIT License
558 stars 153 forks source link

Low performance (in 100 times more) Connect/Bind methods in Docker on Win11 with Linux containers #216

Closed P9avel closed 1 year ago

P9avel commented 2 years ago

Hi, i am used simple code

[HttpGet] public string Get() { Stopwatch stopWatch = new Stopwatch();

        using (var con = new LdapConnection())
        {
            stopWatch.Start();
            con.Connect("www.zflexldap.com", 389);
            stopWatch.Stop();
        }

        TimeSpan ts = stopWatch.Elapsed;
        return ts.ToString();
    }

When i running from VS 2022 i am get 0,2 sec. When running docker file from VS, i am ge 12sec and more (sometime in 100 times more). Please look my image. Can you to help me? What need to do in my case for reducing execution time?

image

PS. VS 2022 17.3.4, Docker Desktop 4.12.0 (85629), Windows 11, project in atachments TestLDAP.zip