"Looks like Xml in some places EntityDesigner is misused e.g.
IsValidXmlAttributeValue(string s) creates an XmlDocument instance to try to create an attribute and catches exception to verify that the attribute name is valid or not - this can easily be replaced by XmlConvert.VerifyNCName call. Another example is reparsing the whole Xml document just to clone it like this:
XDocument document = XDocument.Parse(this._artifact.XDocument.ToString(), LoadOptions.PreserveWhitespace);
to clone the document. Here we probably could use XDocument(XDocument) ctor that deep clones the source document which will not have to parse the Xml and therefore will be faster. "
This item was migrated from the DevDiv work item tracking system [ID=380461].
Comments: We've taken care of the worst parts of this issue in EF6. The remaining work can be done in the future since it has no functional impact on the product.
IsValidXmlAttributeValue(string s) creates an XmlDocument instance to try to create an attribute and catches exception to verify that the attribute name is valid or not - this can easily be replaced by XmlConvert.VerifyNCName call. Another example is reparsing the whole Xml document just to clone it like this:
XDocument document = XDocument.Parse(this._artifact.XDocument.ToString(), LoadOptions.PreserveWhitespace);
to clone the document. Here we probably could use XDocument(XDocument) ctor that deep clones the source document which will not have to parse the Xml and therefore will be faster. "
This item was migrated from the DevDiv work item tracking system [ID=380461].
Comments: We've taken care of the worst parts of this issue in EF6. The remaining work can be done in the future since it has no functional impact on the product.