Author: atsushi
Date: 2005-12-08 12:51:19 -0500 (Thu, 08 Dec 2005)
New Revision: 54116
Modified:
trunk/mcs/class/System.XML/System.Xml/ChangeLog
trunk/mcs/class/System.XML/System.Xml/XmlTextReader.cs
Log:
2005-12-08 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlTextReader.cs : avoid Char.IsSurrogate() and do it inside
PeekChar(), which improves notable performance.
Modified: trunk/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-12-08 17:11:21 UTC
(rev 54115)
+++ trunk/mcs/class/System.XML/System.Xml/ChangeLog 2005-12-08 17:51:19 UTC
(rev 54116)
@@ -1,5 +1,10 @@
2005-12-08 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * XmlTextReader.cs : avoid Char.IsSurrogate() and do it inside
+ PeekChar(), which improves notable performance.
+
+2005-12-08 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* XmlReaderSettings.cs : Schemas will be created only when it is
required.
Modified: trunk/mcs/class/System.XML/System.Xml/XmlTextReader.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlTextReader.cs 2005-12-08
17:11:21 UTC (rev 54115)
+++ trunk/mcs/class/System.XML/System.Xml/XmlTextReader.cs 2005-12-08
17:51:19 UTC (rev 54116)
@@ -1110,7 +1110,7 @@
char c = peekChars [peekCharsIndex];
if (c == 0)
return -1;
- if (!char.IsSurrogate (c))
+ if (c < 0xD800 || 0xDFFF < c)
return c;
if (peekCharsLength == peekCharsIndex + 1) {
if (!ReadTextReader (c))
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches