Lets assume we have these Connection Strings:

 

ConnectionString1 = "Data Source=SomeHostname; Database=c:\\foobar.fdb; User=SYSDBA; Password=masterkey;";

ConnectionString2 = "Data Source=192.168.0.5; Database=c:\\foobar.fdb; User=SYSDBA; Password=masterkey;";

 

When connecting to a firebirdserver the .NET-Provider currently does (in GdsConnection.cs):

Assume "Data Source" is a hostname and try to resolve it using Dns.GetHostEntry()

If that did not work out (although Dns.GetHostEntry()  also takes IPs): Assume it is an IP and try to parse it using IPAddress.Parse()

 

The problem: If you use ConnectionString2 (an IP as DataSource) on some computers Dns.GetHostEntry() consumes a lot of time until it realizes that its not a hostname but an IP.

The solution: First assume Data Source is an IP-Adress an if its not try to resolve it using Dns.GetHostEntry()

I submitted this to the tracker: http://tracker.firebirdsql.org/browse/DNET-53

 

The problem with the solution:

It is unsure if that might slow down connecting when using a Hostname as Data Source.

I hope IPAdress.Parse() only parses and does not do any time consuming like looking for dns-records or something like that.

 

Maybe someone here knows if changing the order of IPAdress.Parse() and Dns.GetHostEntry() may impact

speed or wants to help testing ;D

 

Greetings to the mailing list,

Bernd Hesse

 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to