Update dependencies and refactor Fixed Width Parser for performance - #46
Merged
Conversation
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 5 to 6. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](actions/setup-dotnet@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
--- updated-dependencies: - dependency-name: csFastFloat dependency-version: 4.1.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
--- updated-dependencies: - dependency-name: Microsoft.Testing.Extensions.CodeCoverage dependency-version: 18.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
--- updated-dependencies: - dependency-name: Microsoft.Testing.Extensions.TrxReport dependency-version: 2.3.2 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.Testing.Extensions.TrxReport dependency-version: 2.3.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
--- updated-dependencies: - dependency-name: System.IO.Pipelines dependency-version: 10.0.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
- Updated the FixedWidthAsyncRecordEnumerable and FixedWidthRecordEnumerable classes to utilize a new generic RecordEnumeratorCore, allowing for better type handling and performance optimizations. - Introduced ISource interface for managing buffered record reading, implemented by StreamSource and TextReaderSource. - Refactored line parsing strategies to implement a new IRecordLineParser interface, enhancing type safety and reducing allocations. - Removed obsolete Utf8AsyncRecordEnumeratorCore and Utf8RecordEnumeratorCore classes, consolidating functionality into the new generic structure. - Updated tests to reflect changes in enumerator types, ensuring they remain value types for allocation-free iteration.
- Updated FixedWidthUtf8.cs to replace GeneratedUtf8FixedWidthRecordEnumerable with a more generic Utf8FixedWidthRecordEnumerable that accepts a line parser type. - Refactored ColumnParserFactory and Utf8ColumnParserFactory to streamline date parsing logic using a new BuildExact method for better code reuse. - Removed GeneratedFixedWidthAsyncRecordEnumerable and GeneratedFixedWidthRecordEnumerable classes to simplify the codebase and reduce redundancy. - Updated various reader classes (FixedWidthAsyncRecordEnumerable, FixedWidthByteReader, FixedWidthReader, etc.) to utilize the new generic record enumerable structure. - Enhanced Utf8FixedWidthAsyncRecordEnumerable and Utf8FixedWidthRecordEnumerable to accept a line parser type, improving flexibility and maintainability. - Adjusted tests in GeneratedUtf8ReaderTests to reflect changes in the enumerable structure and ensure continued functionality.
Bumps Meziantou.Analyzer from 3.0.122 to 3.0.123 Bumps Microsoft.CodeAnalysis.NetAnalyzers from 11.0.100-preview.5.26302.115 to 11.0.100-preview.6.26359.118 Bumps SonarAnalyzer.CSharp from 10.28.0.143324 to 10.29.0.143774 --- updated-dependencies: - dependency-name: Meziantou.Analyzer dependency-version: 3.0.123 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: analyzers - dependency-name: Microsoft.CodeAnalysis.NetAnalyzers dependency-version: 11.0.100-preview.6.26359.118 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: analyzers - dependency-name: SonarAnalyzer.CSharp dependency-version: 10.29.0.143774 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: analyzers ... Signed-off-by: dependabot[bot] <support@github.com>
…FixedWidthParser/develop/System.IO.Pipelines-10.0.10 Bump System.IO.Pipelines from 10.0.9 to 10.0.10
…s/FixedWidthParser.Generator.Tests/develop/multi-747a3f1faf Bump Microsoft.Testing.Extensions.TrxReport from 2.2.3 to 2.3.2
…elop/csFastFloat-4.1.6
…FixedWidthParser/develop/csFastFloat-4.1.6 Bump csFastFloat from 4.1.5 to 4.1.6
…ests/develop/Microsoft.Testing.Extensions.CodeCoverage-18.9.0
…s/FixedWidthParser.Tests/develop/Microsoft.Testing.Extensions.CodeCoverage-18.9.0 Bump Microsoft.Testing.Extensions.CodeCoverage from 18.8.0 to 18.9.0
…lop/analyzers-88fc51832c Bump Meziantou.Analyzer and 2 others
…ions/develop/actions/setup-dotnet-6 Bump actions/setup-dotnet from 5 to 6
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
==========================================
+ Coverage 86.39% 89.18% +2.79%
==========================================
Files 42 37 -5
Lines 1962 1738 -224
Branches 341 322 -19
==========================================
- Hits 1695 1550 -145
+ Misses 192 117 -75
+ Partials 75 71 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Benchmark ResultsMeasured on Benchmarks.Perf.AsyncReaderBenchmarks
Benchmarks.Perf.ByteReaderBenchmarks
Benchmarks.Perf.ByteReaderPoolingBenchmarks
Benchmarks.Perf.ByteReaderStreamBenchmarks
Benchmarks.Perf.ComparisonBenchmarks
Benchmarks.Perf.ComparisonWriterBenchmarks
Benchmarks.Perf.ParserBenchmarks
Benchmarks.Perf.PipeReaderBenchmarks
Benchmarks.Perf.ReaderBenchmarks
Benchmarks.Perf.ReaderStartupBenchmarks
Benchmarks.Perf.SourceGenParserBenchmarks
Benchmarks.Perf.WriterBenchmarks
|
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.
This pull request makes several important improvements and updates across the codebase, focusing on code quality, dependency management, and public API consistency. The most significant changes include updating workflow configurations to support the
developbranch, upgrading dependencies and analyzers, refactoring public API return types for consistency, and internal code cleanups.Workflow and Dependency Updates:
actions/setup-dotnet@v6and added support for thedevelopbranch in CI and CodeQL triggers. [1] [2] [3] [4] [5] [6] [7] [8]Directory.Build.propsandFixedWidthParser.csproj(e.g.,SonarAnalyzer.CSharp,Meziantou.Analyzer,Microsoft.CodeAnalysis.NetAnalyzers,csFastFloat,System.IO.Pipelines), and removed the unusedMicrosoft.CodeAnalysis.BannedApiAnalyzerspackage. [1] [2]Public API Refactoring:
Read,ReadFile, andReadAsyncmethods inFixedWidth.csandFixedWidthUtf8.csto use the genericFixedWidthRecordEnumerable<TModel, GeneratedLineParser<TModel>>and related types instead of the oldGeneratedFixedWidthRecordEnumerable<TModel>types, improving API consistency and extensibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Internal Code Improvements:
IsDateTimeTypeinFixedWidthModelGenerator.csfor better code reuse and clarity. [1] [2] [3]ColumnLayoutValidatorfrompublictointernal, restricting its usage to within the assembly.Project File Cleanups:
Directory.Build.propsto simplify the build configuration.These changes collectively improve maintainability, code quality, and the developer experience.