We have performance critical code that is currently using XmlWriter by C# code injected into C/Side meta data and using reflection to add refferences. We would like to translate this to a more sane model, but the XDocument (that the current wrappers use?) are not performant as in CPU and memory as the XmlWriter.
XDocument ( 5000 times 1k) : 15.561 sec
XML Writer ( 5000 times 1k) : 8.795 sec
XDocument ( 5 times 200k) : 8.046 sec mem 755 mb
XML Writer ( 5 times 200k) : 2.269 sec mem 67 mb
Numbers shows that XmlWriter is over 3 times as fast when using larger object and consumes less than 10 times the memory. These numbers increase the larger the document. Main difference is that XmlWriter writes directly/forward only (no DOM) to a stream.
Thank you
We are about to write a large project that emits large chunks of XML data - any status on this?
@StanislawStempin we also have a lot of performance issues due to XML Writer not being available. Please, can someone look into this?
Also, the Xml Writer code in C/AL seems to match with the Xml Writer in C#. Expecting AL will have the exact same functions as C#, it will be a lot easier to maintain C/AL and AL at the same time.
hi @angela2389 and co. - please vote here: https://experience.dynamics.com/ideas/idea/?ideaid=f07b7746-6c80-e911-80e7-0003ff68bdb5 - thanx
Most helpful comment
@StanislawStempin we also have a lot of performance issues due to XML Writer not being available. Please, can someone look into this?
Also, the Xml Writer code in C/AL seems to match with the Xml Writer in C#. Expecting AL will have the exact same functions as C#, it will be a lot easier to maintain C/AL and AL at the same time.