Enhance ExcelReader to Support Ref Structs - #36
Merged
Conversation
- Introduced `ExcelRowContext` to provide context for row parsing. - Updated `ColumnParserFactory` to support ref structs, enabling zero-copy parsing for `ReadOnlySpan<byte>`. - Added `NamedColumnBinding` and `NamedRefRowEnumerable` to facilitate named column parsing for ref structs. - Implemented `NamedRefRowEnumerator` to handle row enumeration for ref structs, ensuring zero-allocation. - Created `RefParser` for reflection-based parsing of ref structs, mirroring existing functionality for classes. - Added benchmarks to measure performance improvements with ref structs. - Developed comprehensive tests for `RefParser`, validating attribute-driven parsing and zero-copy behavior.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #36 +/- ##
==========================================
- Coverage 88.79% 88.66% -0.14%
==========================================
Files 83 88 +5
Lines 5464 5600 +136
Branches 1038 1067 +29
==========================================
+ Hits 4852 4965 +113
- Misses 385 405 +20
- Partials 227 230 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Benchmark ResultsMeasured on ExcelReader.Benchmarks.ColdStartBenchmark
ExcelReader.Benchmarks.CsvParseBenchmark
ExcelReader.Benchmarks.CsvReadBenchmark
ExcelReader.Benchmarks.CsvWriteBenchmark
ExcelReader.Benchmarks.ParseBenchmark
ExcelReader.Benchmarks.ReadBenchmark
ExcelReader.Benchmarks.RealDataReadBenchmark
ExcelReader.Benchmarks.RecordWriteBenchmark
ExcelReader.Benchmarks.WriteBenchmark
ExcelReader.Benchmarks.XlsReadBenchmark
ExcelReader.Benchmarks.XlsWriteBenchmark
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ExcelRowContextto provide context for row parsing.ColumnParserFactoryto support ref structs, enabling zero-copy parsing forReadOnlySpan<byte>.NamedColumnBindingandNamedRefRowEnumerableto facilitate named column parsing for ref structs.NamedRefRowEnumeratorto handle row enumeration for ref structs, ensuring zero-allocation.RefParserfor reflection-based parsing of ref structs, mirroring existing functionality for classes.RefParser, validating attribute-driven parsing and zero-copy behavior.