AL icon indicating copy to clipboard operation
AL copied to clipboard

Feature Request: Add XmlWriter .NET Wrapper

Open AndersMad opened this issue 9 years ago • 4 comments

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

AndersMad avatar Nov 28 '17 09:11 AndersMad

We are about to write a large project that emits large chunks of XML data - any status on this?

AndersMad avatar Feb 27 '19 08:02 AndersMad

@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.

angela2389 avatar Apr 02 '19 08:04 angela2389

hi @angela2389 and co. - please vote here: https://experience.dynamics.com/ideas/idea/?ideaid=f07b7746-6c80-e911-80e7-0003ff68bdb5 - thanx

AndersMad avatar Jun 03 '19 12:06 AndersMad

Hi! This issue is beyond the scope of the AL language and development tools. Please go ahead and post this to our Ideas forum at https://aka.ms/BusinessCentralideas, or vote up the idea if its already there. We're constantly monitoring top Ideas and will consider them for a future release.

thpeder avatar Nov 28 '23 14:11 thpeder