2007-11-01 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Thu, 1 Nov 2007 23:45:24 +0000 (23:45 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 1 Nov 2007 23:45:24 +0000 (23:45 -0000)
* Socket.cs: Do not set the Send and Receive buffer sizes for the
socket to the defaults set on Windows, they kill our performance.

Thanks to Zoltan Varga for tracking the performance issue down.
The bug was #325032

svn path=/trunk/mcs/; revision=88700

mcs/class/System/System.Net.Sockets/ChangeLog
mcs/class/System/System.Net.Sockets/Socket.cs

index bf5d66ab5e1d736113a52e66a31238b048ddc1c7..7ad9fe0c08b8f6e477c45e30659e9d24b3dfe437 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-01  Miguel de Icaza  <miguel@novell.com>
+
+       * Socket.cs: Do not set the Send and Receive buffer sizes for the
+       socket to the defaults set on Windows, they kill our performance.
+
+       Thanks to Zoltan Varga for tracking the performance issue down.
+       The bug was #325032
+
 2007-10-30  Dick Porter  <dick@ximian.com>
 
        * UdpClient.cs: Don't set the multicast option twice.  Fixes bug
index b8154a6f1db59749edb05b83f95b63014f5236fb..c660126070b022cfaa2077a4abc67a401496246a 100644 (file)
@@ -683,9 +683,13 @@ namespace System.Net.Sockets
                                        this.DontFragment = false;
                                }
 
-                               /* Set the same defaults as the MS runtime */
-                               this.ReceiveBufferSize = 8192;
-                               this.SendBufferSize = 8192;
+                               //
+                               // Microsoft sets these to 8192, but we are going to keep them
+                               // both to the OS defaults as these have a big performance impact.
+                               // on WebClient performance.
+                               //
+                               //this.ReceiveBufferSize = 8192;
+                               //this.SendBufferSize = 8192;
                        } catch (SocketException) {
                        }
 #endif