Commit Graph
938 Commits
Author SHA1 Message Date
Atsushi Eno 720f62defa 2006-02-20 Atsushi Enomoto <[email protected]>
* 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
2006-02-20 18:48:47 +00:00
Atsushi Eno 77f3ba2df1 2006-02-20 Atsushi Enomoto <[email protected]>
* 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
2006-02-20 15:00:34 +00:00
Atsushi Eno dd21a2493d 2006-02-20 Atsushi Enomoto <[email protected]>
* XmlNodeReaderImpl.cs : optimized Depth.


svn path=/trunk/mcs/; revision=57067
2006-02-20 14:35:40 +00:00
Atsushi Eno 23a31be5d3 2006-02-20 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : reducing layered ReadState invocation
	  results in 10% speed up.


svn path=/trunk/mcs/; revision=57064
2006-02-20 13:02:16 +00:00
Atsushi Eno 9dd3ce56cf 2006-02-20 Atsushi Enomoto <[email protected]>
* 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
2006-02-20 12:18:54 +00:00
Atsushi Eno b2ebb226a7 2006-02-17 Atsushi Enomoto <[email protected]>
* XmlElement.cs : NextSibling could be effectively computed using
	  LastLinkedChild, beyond previous XmlLinkedNode optimization.


svn path=/trunk/mcs/; revision=57011
2006-02-17 19:03:46 +00:00
Atsushi Eno a59f3687fd 2006-02-17 Atsushi Enomoto <[email protected]>
* XmlLinkedNode.cs : In NextSibling, use LastChild directly.
	  It improves NextSibling performance in bulky document.


svn path=/trunk/mcs/; revision=57005
2006-02-17 18:37:58 +00:00
Atsushi Eno 2d48028de9 2006-02-17 Atsushi Enomoto <[email protected]>
* 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
2006-02-17 18:19:23 +00:00
Atsushi Eno 01d782a63c 2006-02-17 Atsushi Enomoto <[email protected]>
* DTDValidatingReader2.cs : more refactoring. Split ReadContent()
	  into some methods. Reduced some extra MoveToElement().


svn path=/trunk/mcs/; revision=56995
2006-02-17 17:47:13 +00:00
Atsushi Eno f1f4028ef3 2006-02-17 Atsushi Enomoto <[email protected]>
* 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
2006-02-17 17:03:36 +00:00
Atsushi Eno ef21cde061 2006-02-17 Atsushi Enomoto <[email protected]>
* DTDValidatingReader2.cs : attribute node simplification. It now
	  stores attribute node slots, including default attributes for
	  further refactoring.


svn path=/trunk/mcs/; revision=56978
2006-02-17 16:07:12 +00:00
Atsushi Eno 29ce6906d7 2006-02-17 Atsushi Enomoto <[email protected]>
* 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
2006-02-17 08:47:38 +00:00
Atsushi Eno ef51df4bb9 2006-02-17 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs : entity resolution method will be used in
	  the next DTD validating reader in 1.x.


svn path=/trunk/mcs/; revision=56966
2006-02-17 05:20:27 +00:00
Atsushi Eno cbc55bdc39 2006-02-16 Atsushi Enomoto <[email protected]>
* 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
2006-02-16 15:46:11 +00:00
Atsushi Eno 64fff6456c 2006-02-16 Atsushi Enomoto <[email protected]>
* 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
2006-02-16 15:40:51 +00:00
Atsushi Eno 7fc6c818a1 forgot changelog.
svn path=/trunk/mcs/; revision=56919
2006-02-16 11:53:34 +00:00
Atsushi Eno 0ef60eab7a 2006-02-16 Atsushi Enomoto <[email protected]>
* 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
2006-02-16 10:30:13 +00:00
Atsushi Eno 5ac56e429a 2006-02-16 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : atomize whitespace values. It effectively saves
	  memory consumption when an input XML is indented.


svn path=/trunk/mcs/; revision=56917
2006-02-16 09:27:47 +00:00
Atsushi Eno dd7de66cdd 2006-02-14 Atsushi Enomoto <[email protected]>
* 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
2006-02-14 04:34:43 +00:00
Atsushi Eno 3dbaff91f4 2006-02-14 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : (WriteElementString and WriteAttributeString)
	  Skip empty string output.


svn path=/trunk/mcs/; revision=56844
2006-02-14 04:17:29 +00:00
Atsushi Eno f99e279c01 2006-02-14 Atsushi Enomoto <[email protected]>
* 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
2006-02-14 03:44:18 +00:00
Atsushi Eno 7474c9c39a 2006-02-11 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs :
	  Avoid extra AppendValueChar() in ReadWhitespace().


svn path=/trunk/mcs/; revision=56767
2006-02-10 18:45:34 +00:00
Atsushi Eno c6ccddb382 2006-02-06 Atsushi Enomoto <[email protected]>
* 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
2006-02-06 15:14:54 +00:00
Atsushi Eno 7a4835c251 2006-02-06 Atsushi Enomoto <[email protected]>
* 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
2006-02-06 11:31:30 +00:00
Atsushi Eno c47a86cc87 2006-02-06 Atsushi Enomoto <[email protected]>
* 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
2006-02-06 08:42:07 +00:00
Atsushi Eno 1e49788762 2006-02-04 Atsushi Enomoto <[email protected]>
* 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
2006-02-04 07:54:00 +00:00
Atsushi Eno 5adf96e28f 2006-02-04 Atsushi Enomoto <[email protected]>
* XmlDocumentNavigator.cs : make use of HasAttributes (avoid possible
	  XmlAttributeCollection creation).


svn path=/trunk/mcs/; revision=56559
2006-02-04 07:52:13 +00:00
Atsushi Eno c150169800 2006-02-03 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : no need to call Clear() for each attribute value.


svn path=/trunk/mcs/; revision=56523
2006-02-03 14:05:48 +00:00
Atsushi Eno 4f249deb76 2006-02-03 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : reverted most of the previous changes. It somehow
	  broke System.Data tests.


svn path=/trunk/mcs/; revision=56519
2006-02-03 12:39:02 +00:00
Atsushi Eno 4bacaff049 2006-01-30 Atsushi Enomoto <[email protected]>
* 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
2006-01-30 19:30:59 +00:00
Atsushi Eno 501b9babc0 2006-01-30 Atsushi Enomoto <[email protected]>
* 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
2006-01-30 08:15:51 +00:00
Atsushi Eno e2440ce8e1 2006-01-30 Atsushi Enomoto <[email protected]>
* XmlNodeReader2.cs XmlException.cs XmlReader.cs XmlTextReader.cs
	  XmlWriter.cs XmlTextWriter.cs XmlValidatingReader.cs
	  XmlNodeReaderImpl.cs DTDValidatingReader.cs XmlSecureResolver.cs:
	  cleaning up obsolete NET_1_0 code.


svn path=/trunk/mcs/; revision=56239
2006-01-30 08:10:05 +00:00
Atsushi Eno 4455f8563d 2006-01-28 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : avoid case-insensitive String.Compare().
	  Use array for openElements rather than ArrayList.


svn path=/trunk/mcs/; revision=56210
2006-01-28 18:37:11 +00:00
Atsushi Eno 2b419d3520 2006-01-28 Atsushi Enomoto <[email protected]>
* XmlElement.cs, XmlAttribute.cs :
	  Avoid ChildNodes.Count and use FirstChild/NextSibling.


svn path=/trunk/mcs/; revision=56208
2006-01-28 17:33:24 +00:00
Atsushi Eno c2471811ff 2006-01-28 Atsushi Enomoto <[email protected]>
* 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
2006-01-28 07:53:16 +00:00
Atsushi Eno de0937aac0 2006-01-28 Atsushi Enomoto <[email protected]>
* 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
2006-01-28 07:03:20 +00:00
Paolo Molaro 6cc731eeeb Fri Jan 27 20:39:48 CET 2006 Paolo Molaro <[email protected]>
* XmlTextReader.cs, XmlChar.cs: more tweaks and speedups.


svn path=/trunk/mcs/; revision=56186
2006-01-27 19:40:37 +00:00
Atsushi Eno 0144433aec 2006-01-27 Atsushi Enomoto <[email protected]>
* 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
2006-01-27 16:51:55 +00:00
Atsushi Eno b6fd808562 2006-01-27 Atsushi Enomoto <[email protected]>
* XmlNode.cs : disabled XmlIteratorNodeList optimization. It caused
	  some kind of regression under mcs/tests/xml-025.cs.


svn path=/trunk/mcs/; revision=56153
2006-01-27 10:22:40 +00:00
Atsushi Eno b3e660af62 2006-01-27 Atsushi Enomoto <[email protected]>
* 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
2006-01-27 09:32:28 +00:00
Atsushi Eno f98a6cf05b 2006-01-27 Atsushi Enomoto <[email protected]>
* 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
2006-01-27 08:38:28 +00:00
Atsushi Eno ca8695d941 2006-01-27 Atsushi Enomoto <[email protected]>
* 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
2006-01-27 08:06:49 +00:00
Atsushi Eno 635a196821 2006-01-27 Atsushi Enomoto <[email protected]>
* XmlNode.cs :
	  in get_InnerText(), avoid extraneous StringBuilder creation.


svn path=/trunk/mcs/; revision=56149
2006-01-27 07:06:09 +00:00
Atsushi Eno 150bf8474d 2006-01-27 Atsushi Enomoto <[email protected]>
* 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
2006-01-27 06:29:26 +00:00
Atsushi Eno 69c5728b60 2006-01-26 Atsushi Enomoto <[email protected]>
* XmlWriter.cs : Dispose() is protected.

	* XmlSchemaValidationException.cs : fixed .ctor() signatures.

	* XPathNavigator.cs : fixed IsNode signature found by updated
	  corcompare.


svn path=/trunk/mcs/; revision=56048
2006-01-25 15:36:37 +00:00
Atsushi Eno 1b1e61c037 2006-01-25 Atsushi Enomoto <[email protected]>
* XmlNamedNodeMap.cs : lazily create internal ArrayList. Thanks to
	  Joshua Tauberer for the hint.


svn path=/trunk/mcs/; revision=56028
2006-01-25 04:06:28 +00:00
Atsushi Eno 1c8a5029e0 2006-01-25 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : ToString(TimeSpan) should return valid duration
	  for TimeSpan.Zero, rather than "P". Fixed bug #77350

	* XmlConvertTests.cs : added test for bug #77350.


svn path=/trunk/mcs/; revision=56026
2006-01-25 03:36:13 +00:00
Atsushi Eno c36beac875 2006-01-24 Atsushi Enomoto <[email protected]>
* XmlNameEntryCache.cs XmlNameEntry.cs :
	  Made name entry fields as not read-only. Added Update() to reset
	  members. Its semantics of Equals() is changed.
	  Now entry cache is based on Hashtable rather than ArrayList.
	  It saves heavy iteration in ArrayList.


svn path=/trunk/mcs/; revision=56003
2006-01-24 20:38:37 +00:00
Atsushi Eno 3e22b34ec4 2006-01-24 Atsushi Enomoto <[email protected]>
* XmlNameEntryCache.cs XmlNameEntry.cs XmlDocument.cs :
	  Add Hash field to find name entry quickly.
	  In XmlNameEntryCache make use of name table (it is totally
	  unused there though).


svn path=/trunk/mcs/; revision=55970
2006-01-24 05:42:16 +00:00
Atsushi Eno ee9d802656 2006-01-16 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : handle Ticks. Fixed bug #77252.

	* XmlConvertTests.cs : added test for bug #77252.


svn path=/trunk/mcs/; revision=55620
2006-01-16 06:06:54 +00:00