Possible XmlDataReader? #90
Replies: 6 comments 5 replies
-
I'm not really interested in pursuing that. The |
Beta Was this translation helpful? Give feedback.
-
Use of Span, etc. Improved memory use. |
Beta Was this translation helpful? Give feedback.
-
System.Xml can be used in a low-allocation way, even though it doesn't support Span. I've used it to create a data reader for excel (.xlsx), that has significantly lower allocation that other .NET excel libraries, including the most popular and closed-source commercial libraries. As an example of the APIs in-use: |
Beta Was this translation helpful? Give feedback.
-
To answer your question about the benchmark performance, I think the issue is in the construction of your benchmark against my library. Taking a look at the link you shared via Twitter: The body of the loop is creating a new Another thing I would point out is that my library also offers optimization/reduced allocation via the strongly typed field accessors. Calling The results on my machine with these changes:
I will send a PR with these changes so you can experiment with it. |
Beta Was this translation helpful? Give feedback.
-
Each row (List) is created at capacity: |
Beta Was this translation helpful? Give feedback.
-
@electricessence I got around to publishing the benchmarks for my Excel library this morning. It does require a bit of effort to avoid allocations when using |
Beta Was this translation helpful? Give feedback.
-
Seems like with your existing code base and expertise, this would be easier to do than most.
Is this something of interest? Or no?
I can't find any XML readers out there than will take advantage of modern techniques.
Beta Was this translation helpful? Give feedback.
All reactions