Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-03-31 05:10:50 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-03-31 05:10:50 +0400
commit2f8429a60cff02e8fb61976f7aa8850090ee3c8f (patch)
tree4550f6ed0295fa1f2b1249e61d7722fdce2f9fc8 /mcs
parentbd0bcede7e596c1df2be529975991816e3a265c7 (diff)
2010-03-30 Gonzalo Paniagua Javier <gonzalo@novell.com>
* HttpResponseStream.cs: speed up short writes. svn path=/branches/mono-2-6/mcs/; revision=154526
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.Web/System.Web/ChangeLog4
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponseStream.cs8
2 files changed, 11 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog
index 7317e53a4b2..83ceae772f7 100644
--- a/mcs/class/System.Web/System.Web/ChangeLog
+++ b/mcs/class/System.Web/System.Web/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-30 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * HttpResponseStream.cs: speed up short writes.
+
2010-03-06 Marek Habersack <mhabersack@novell.com>
* HttpUtility.cs: decode entities which use hexadecimal
diff --git a/mcs/class/System.Web/System.Web/HttpResponseStream.cs b/mcs/class/System.Web/System.Web/HttpResponseStream.cs
index 6d95d895e93..044ede8a547 100644
--- a/mcs/class/System.Web/System.Web/HttpResponseStream.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponseStream.cs
@@ -188,7 +188,13 @@ namespace System.Web {
EnsureCapacity (position + count);
byte *src = (byte *) ptr.ToPointer ();
- memcpy (data + position, src, count);
+ if (count < 32) {
+ byte *dest = (data + position);
+ for (int i = 0; i < count; i++)
+ *dest++ = *src++;
+ } else {
+ memcpy (data + position, src, count);
+ }
position += count;
}