performance difference in .NET 1.0 and .NET 2.0

I recently upgraded a sockets application from .NET 1.1 to .NET 2.0.

I found that the getByName method on the INetAddress class takes several times longer to execute under .NET 2.0 than it did in .NET 1.1.

That is INetAddress.getByName("10.0.0.1") is a MUCH costlier operation under 2.0.

Any suggestions on how best to go about 'recovering' the lost performance would be appreciated. Currently, I am caching the resolution, but it seens silly that a dotted IP address would take up so much time.

In fact, any solution where I can convert a System.Net.IPAddress to a java.net.INetAddress trivially would be great.



Answer this question

performance difference in .NET 1.0 and .NET 2.0

  • Dunx

    Hi,

    Thanks for reporting this issue. We are looking into this.

    We will keep you updated.

    Thanks,

    Noorul Ameen.


  • Jeroen Mostert

    I looked at Ethereal; apparently, InetAddress.GetByName was trying to resolve the name by sending DNS packet. Is there work around to avoid this performance issue

    Howard Lung


  • Nathan Pieper

    Hi ,

    This performance difference is because of we changed our implementation from .NET 1.0 to .NET 2.0 for java.net.InetAddress. We also have one performance Bug filed on this.

    Thanks,

    Noorul Ameen.


  • JLundgren

    This problem is even worse for our application based upon udp multicasting.

    The InetAddress.getByName("224.10.10.10") is extremly costly. It slows down

    our application by 100 folds.

    Will MS please also complete InetAddress.getByAddress(byte[] address)

    implementation

    Please, as, we have no workaround.


  • performance difference in .NET 1.0 and .NET 2.0