* XmlNamespaceManager.cs : added internal LookupPrefixExclusive()
which discards "overriden" namespaces.
* XmlTextWriter2.cs : fresh implementation.
- The source structure is simplified and cleaner.
- When outputting escaped string, output directly to TextWriter.
- roughly 20% performance improvement.
(Also fixed previous perf. evaluation excess in ChangeLog.)
* XmlReaderCommonTests.cs : added custom assertion overload that takes
test label.
* XmlNodeReaderTests.cs : labeled some.
* XmlTextWriterTests.cs :
Changed the semantics of AttributeNamespacesXmlnsXmlns() and
removed NotDotNet (in contrast this test should fail with previous
version of XmlTextWriter). See the code comment for details.
Added WriteQualifiedNameXmlnsError().
* System.Xml.dll.sources : removed XmlTextWriterOpenElement.cs and
XmlTextWriter.cs. Added XmlTextWriter2.cs, to be renamed to
XmlTextWriter.cs in a few days or weeks.
svn path=/trunk/mcs/; revision=57095
* DTDValidatingReader2.cs : added Source XmlReader property for
XsdValidatingReader use (see XsdValidatingReader change as well).
* XsdValidatingReader.cs : when DTD did not appear in
DTDValidatingReader, it almost makes no sense to use it, so just
use its internal EntityResolvingXmlReader (it is required to
detect "undeclared entity in use" well-formedness violation).
It could double processing speed (or more).
svn path=/trunk/mcs/; revision=57077
* EntityResolvingXmlReader.cs, XmlNodeReader2.cs, XmlTextReader2.cs :
in get_NodeType() entity reader existence check is faster.
* DTDValidatingReader2.cs : IsDefault could be avoided.
svn path=/trunk/mcs/; revision=57069
* XmlNodeReaderImpl.cs : Reimplemented Read(). Points are:
- reduced call to NextSibling which is very unlikely to be inlined
- reorganized conditioning to avoid extra check
- added description on each returning branch.
- And then, removed unused code.
It is 1.5x faster than before.
svn path=/trunk/mcs/; revision=57062
* XmlLinkedNode.cs : In NextSibling, use LastChild directly.
It improves NextSibling performance in bulky document.
svn path=/trunk/mcs/; revision=57005
* XmlNodeReaderImpl.cs : do not compute ownerLinkedNode, just store
it in Read(). Simply use state field in EOF. They result in 20%
perf. boost. Expanding EOF also improved performance by 2-3%
(mono --optimize=inline might work in the later stage).
svn path=/trunk/mcs/; revision=56999
* DTDValidatingReader2.cs : more refactoring. Split ReadContent()
into some methods. Reduced some extra MoveToElement().
svn path=/trunk/mcs/; revision=56995
* DTDValidatingReader2.cs : more refactoring. Removed and simplified
some error check. String += would be enough for entity-reference-
mixed attributes which rarely happen, so simplify the code.
Added comments on how the fields are used.
svn path=/trunk/mcs/; revision=56986
* DTDValidatingReader2.cs : attribute node simplification. It now
stores attribute node slots, including default attributes for
further refactoring.
svn path=/trunk/mcs/; revision=56978
* DTDValidatingReader2.cs, EntityResolvingXmlReader.cs :
new files for refactoring DTD validating reader. As the first stage,
it splits entity handling process from DTD validation step.
(DTDValidatingReader.cs will be removed at some stage).
* System.Xml.dll.sources : removed DTDValidatingReader and added
DTDValidatingReader2.cs and EntityResolvingXmlReader.cs.
svn path=/trunk/mcs/; revision=56967
* IHasXmlChildNode.cs :
New internal interface to hold LastLinkedChild.
* XmlNodeListChildren.cs XmlEntity.cs XmlElement.cs XmlAttribute.cs
XmlLinkedNode.cs XmlEntityReference.cs XmlNode.cs
XmlDocumentFragment.cs XmlDocument.cs : use it. It minimizes memory
consumption in XmlText, XmlWhitespace, XmlComment etc.
* System.Xml.dll.sources : added IHasXmlChildNode.cs.
svn path=/trunk/mcs/; revision=56945
* XmlChar.cs : added IndexOfNonWhitespace() and IndexOfInvalid() (not
in use yet).
* NewLineHandling.cs : prepared to be used internally in 1.x.
svn path=/trunk/mcs/; revision=56943
* XmlDocument.cs XmlTextReader.cs : in ReadNode(), we can avoid
extraneous whitespace node creation for XmlTextReader by setting
WhitespaceHandling.Significant when PreserveWhitespace is false.
svn path=/trunk/mcs/; revision=56918
* XmlTextReader.cs : atomize whitespace values. It effectively saves
memory consumption when an input XML is indented.
svn path=/trunk/mcs/; revision=56917
* XmlTextReader.cs : When "Significant" is assigned to
WhitespaceHandling, it should ignore non-significant whitespaces.
* XmlTextReaderTests.cs : added WhitespaceHandling tests.
svn path=/trunk/mcs/; revision=56845
* XmlTextWriter.cs : WriteRaw("") is not simply ignored but process
state check and closes open tag.
* XmlTextWriterTests.cs : added test WriteRaw("") closes open tag.
svn path=/trunk/mcs/; revision=56842
* XmlTextReader.cs : ReadTextReader() is now assured to have current
node content, except for Text, CDATA and Comment. ReadName() does
not use nameBuffer and reuse peekChars.
svn path=/trunk/mcs/; revision=56587
* XmlTextReader.cs : eliminated currentTagBuffer. XmlDeclaration is
now once read as PI and then re-parsed from Value. DTD internal
subset is now parsed as usual "value".
svn path=/trunk/mcs/; revision=56580
* XmlTextReader.cs : Expect() could be written inline and it could
provide better information. ReadEndTag() could use Expect() instead
of costy ReadName().
svn path=/trunk/mcs/; revision=56577
* XmlTextReader.cs : on ReadEndTag() we can avoid NameTable.Add().
Store name, local name and prefix in the stack instead of just name
and reuse them for EndElement.
svn path=/trunk/mcs/; revision=56560
* XmlDocument.cs, XmlAttribute.cs, XmlElement.cs : Avoid unnecessary
name checks in CreateElement() and CreateAttribute().
get_DocumentType() could be stopped when the iterated child node
is the document element.
* XmlNode.cs : removed commented lines.
* XmlNameEntry.cs : hash code for a name entry is mostly identical by
its local name, so avoid extraneous GetHashCode() especially on
namespaces.
svn path=/trunk/mcs/; revision=56270
* XmlReader.cs : ReadOuterXml() returns meaingful value only for
element and attribute. ReadInnerXml() does not have to create
XmlTextWriter for empty elements.
svn path=/trunk/mcs/; revision=56240
* XmlNode.cs, XmlIteratorNodeList.cs :
Now we can enable XmlIteratorNodeList again (mcs, incorrectly
removing nodes in the node list, was fixed).
svn path=/trunk/mcs/; revision=56200
* XmlDocument.cs : in ReadNode() to consume element node, switched
to MoveToAttribute(int) since MoveToNextAttribute() was somehow
not working fine. It is needed to avoid Sys.Data test breakage
and anything else should be fixed indeed.
svn path=/trunk/mcs/; revision=56199
* XmlTextReader.cs : optimization patch by Paolo.
Fast path optimization in PeekChar().
Avoid double-evaluation of PeekChar() and ReadChar() by new
Advance() method.
svn path=/trunk/mcs/; revision=56171
* XmlNode.cs : disabled XmlIteratorNodeList optimization. It caused
some kind of regression under mcs/tests/xml-025.cs.
svn path=/trunk/mcs/; revision=56153
* XmlAttributeCollection.cs :
Replaced all Nodes.Count with Count (it could avoid extraneous
ArrayList creation in XmlNamedNodeMap). ID attribute adjustment
was extraneously done against all attribute nodes and thus there
was a plenty of call to Value.
* XmlNamedNodeMap.cs : added comment on SetNamedItem() W3C spec
violation.
svn path=/trunk/mcs/; revision=56152
* XmlNode.cs,
XmlDocument.cs,
XmlAttribute.cs,
XmlElement.cs :
Added internal AppendChild() override that omites node type
checking, and used it in many places.
svn path=/trunk/mcs/; revision=56151
* XmlDocument.cs : optimized ReadAttributeNode() to not call
MoveToAttribute() unneccesarily (call it only when ReadNode() is
called on an attribute node).
svn path=/trunk/mcs/; revision=56150
* System.Xml.dll.sources : added XmlIteratorNodeList.cs.
* XmlIteratorNodeList.cs : new file for XmlNodeList implementation.
It does not iterate all nodes in advance.
* XmlNode.cs : use XmlIteratorNodeList in SelectNodes().
svn path=/trunk/mcs/; revision=56148