Skip to content

Commit 3b14b70

Browse files
committed
Parser and writer performance. Made configuration read only. Moved mutable config data into the context. Added details to exception messages.
1 parent 255fdb9 commit 3b14b70

File tree

348 files changed

+7649
-9882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+7649
-9882
lines changed

CsvHelper.sln

+22-21
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
88
.editorconfig = .editorconfig
99
.gitignore = .gitignore
1010
GitVersion.yml = GitVersion.yml
11+
global.json = global.json
1112
README.markdown = README.markdown
1213
EndProjectSection
1314
EndProject
@@ -17,7 +18,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CsvHelper.Tests", "tests\Cs
1718
EndProject
1819
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{B0E9C5E1-8A40-4BF7-AF08-6A6E179446A5}"
1920
EndProject
20-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CsvHelper.Benchmarks", "perf\CsvHelper.Benchmarks\CsvHelper.Benchmarks.csproj", "{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}"
21+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CsvHelper.Performance", "performance\CsvHelper.Performance\CsvHelper.Performance.csproj", "{F1C225F2-92FC-41BB-94BF-733454DD2A9D}"
2122
EndProject
2223
Global
2324
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -83,26 +84,26 @@ Global
8384
{B0E9C5E1-8A40-4BF7-AF08-6A6E179446A5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
8485
{B0E9C5E1-8A40-4BF7-AF08-6A6E179446A5}.Release|x64.ActiveCfg = Release|Any CPU
8586
{B0E9C5E1-8A40-4BF7-AF08-6A6E179446A5}.Release|x86.ActiveCfg = Release|Any CPU
86-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
87-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
88-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|ARM.ActiveCfg = Debug|Any CPU
89-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|ARM.Build.0 = Debug|Any CPU
90-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
91-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
92-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|x64.ActiveCfg = Debug|Any CPU
93-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|x64.Build.0 = Debug|Any CPU
94-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|x86.ActiveCfg = Debug|Any CPU
95-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Debug|x86.Build.0 = Debug|Any CPU
96-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
97-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|Any CPU.Build.0 = Release|Any CPU
98-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|ARM.ActiveCfg = Release|Any CPU
99-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|ARM.Build.0 = Release|Any CPU
100-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
101-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
102-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|x64.ActiveCfg = Release|Any CPU
103-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|x64.Build.0 = Release|Any CPU
104-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|x86.ActiveCfg = Release|Any CPU
105-
{E0E9DA3F-67F9-45A7-87CB-52CD02F7C2AB}.Release|x86.Build.0 = Release|Any CPU
87+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
88+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
89+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|ARM.ActiveCfg = Debug|Any CPU
90+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|ARM.Build.0 = Debug|Any CPU
91+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
92+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
93+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|x64.ActiveCfg = Debug|Any CPU
94+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|x64.Build.0 = Debug|Any CPU
95+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|x86.ActiveCfg = Debug|Any CPU
96+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Debug|x86.Build.0 = Debug|Any CPU
97+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
98+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|Any CPU.Build.0 = Release|Any CPU
99+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|ARM.ActiveCfg = Release|Any CPU
100+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|ARM.Build.0 = Release|Any CPU
101+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
102+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
103+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|x64.ActiveCfg = Release|Any CPU
104+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|x64.Build.0 = Release|Any CPU
105+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|x86.ActiveCfg = Release|Any CPU
106+
{F1C225F2-92FC-41BB-94BF-733454DD2A9D}.Release|x86.Build.0 = Release|Any CPU
106107
EndGlobalSection
107108
GlobalSection(SolutionProperties) = preSolution
108109
HideSolutionNode = FALSE

tests/CsvHelper.Tests/CsvHelper.Tests.licenseheader CsvHelper.sln.licenseheader

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
extensions: designer.cs generated.cs
22
extensions: .cs .cpp .h
3-
// Copyright 2009-2020 Josh Close and Contributors
3+
// Copyright 2009-2021 Josh Close
44
// This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
55
// See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
66
// https://github.com/JoshClose/CsvHelper
77
extensions: .aspx .ascx
88
<%--
9-
Copyright 2009-2020 Josh Close and Contributors
9+
Copyright 2009-2021 Josh Close
1010
This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
1111
See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
1212
https://github.com/JoshClose/CsvHelper
1313
--%>
1414
extensions: .vb
15-
' Copyright 2009-2020 Josh Close and Contributors
15+
' Copyright 2009-2021 Josh Close
1616
' This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
1717
' See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
1818
' https://github.com/JoshClose/CsvHelper
19-
extensions: .xml .config .xsd
19+
extensions: .xml .config .xsd
2020
<!--
21-
Copyright 2009-2020 Josh Close and Contributors
21+
Copyright 2009-2021 Josh Close
2222
This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
2323
See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
2424
https://github.com/JoshClose/CsvHelper
2525
-->
2626
extenions: .tt
2727
<#
28-
// Copyright 2009-2020 Josh Close and Contributors
28+
// Copyright 2009-2021 Josh Close
2929
// This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
3030
// See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
3131
// https://github.com/JoshClose/CsvHelper

CsvHelper.v3.ncrunchsolution

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<SolutionConfiguration>
22
<Settings>
3-
<AllowParallelTestExecution>False</AllowParallelTestExecution>
4-
<InstrumentationMode>Optimised</InstrumentationMode>
3+
<AllowParallelTestExecution>True</AllowParallelTestExecution>
54
<SolutionConfigured>True</SolutionConfigured>
65
</Settings>
76
</SolutionConfiguration>

GitVersion.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
next-version: 19.0.0
1+
next-version: 20.0.0
22
assembly-versioning-scheme: Major
33
assembly-file-versioning-format: '{Major}.{Minor}.{Patch}.{env:BUILD_NUMBER ?? 0}'
4-
branches: {}
4+
branches:
5+
span-parser:
6+
regex: fast-parser
7+
source-branches: [ 'span-parser' ]
8+
tag: beta
59
ignore:
610
sha: []
711
merge-message-formats: {}

build/Build.cs

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2009-2021 Josh Close
2+
// This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
3+
// See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
4+
// https://github.com/JoshClose/CsvHelper
15
using System;
26
using System.Linq;
37
using Nuke.Common;
@@ -38,6 +42,8 @@ class Build : NukeBuild
3842
readonly string NugetApiKey;
3943
[Parameter("Version to use for package.")]
4044
readonly string Version;
45+
[Parameter("NuGet package version.")]
46+
readonly string PackageVersion;
4147

4248
[Solution]
4349
readonly Solution Solution;
@@ -81,17 +87,17 @@ class Build : NukeBuild
8187
.SetProjectFile(Solution)
8288
.SetConfiguration(Configuration)
8389
.SetAssemblyVersion(GitVersion.AssemblySemVer)
84-
.SetFileVersion(Version ?? GitVersion.AssemblySemFileVer)
85-
.SetInformationalVersion(Version ?? GitVersion.InformationalVersion)
90+
.SetFileVersion(GitVersion.AssemblySemFileVer)
91+
.SetInformationalVersion(GitVersion.InformationalVersion)
8692
);
8793

8894
DotNetPublish(s => s
8995
.EnableNoRestore()
9096
.EnableNoBuild()
9197
.SetConfiguration(Configuration)
9298
.SetAssemblyVersion(GitVersion.AssemblySemVer)
93-
.SetFileVersion(Version ?? GitVersion.AssemblySemFileVer)
94-
.SetInformationalVersion(Version ?? GitVersion.InformationalVersion)
99+
.SetFileVersion(GitVersion.AssemblySemFileVer)
100+
.SetInformationalVersion(GitVersion.InformationalVersion)
95101
.CombineWith(
96102
from project in new[] { CsvHelperProject }
97103
from framework in project.GetTargetFrameworks()
@@ -125,7 +131,7 @@ from framework in project.GetTargetFrameworks()
125131
.SetProject(CsvHelperProject)
126132
.SetConfiguration(Configuration)
127133
.SetOutputDirectory(ArtifactsDirectory)
128-
.SetVersion(Version ?? GitVersion.NuGetVersionV2)
134+
.SetProperty("PackageVersion", PackageVersion ?? GitVersion.NuGetVersionV2)
129135
.SetIncludeSymbols(true)
130136
.SetSymbolPackageFormat(DotNetSymbolPackageFormat.snupkg)
131137
);

build/_build.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
<TargetFramework>net50</TargetFramework>
66
<RootNamespace></RootNamespace>
77
<NoWarn>CS0649;CS0169</NoWarn>
88
<NukeRootDirectory>..</NukeRootDirectory>

docs-src/CsvHelper.DocsGenerator/CsvHelper.DocsGenerator.v3.ncrunchproject

-5
This file was deleted.

global.json

-5
This file was deleted.

global.json.bak

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "3.1.100",
4+
"rollForward": "latestMajor"
5+
}
6+
}

perf/CsvHelper.Benchmarks/CsvHelper.Benchmarks.csproj

-16
This file was deleted.

perf/CsvHelper.Benchmarks/CsvHelper.Benchmarks.v3.ncrunchproject

-5
This file was deleted.

perf/CsvHelper.Benchmarks/ObjectCreatorBenchmarks.cs

-35
This file was deleted.

perf/CsvHelper.Benchmarks/Program.cs

-13
This file was deleted.

performance/CsvHelper.Performance/CsvHelper.Performance.csproj

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net45</TargetFramework>
5+
<TargetFramework>net50</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<ProjectReference Include="..\CsvHelper\CsvHelper.csproj" />
9+
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
10+
<PackageReference Include="LumenWorksCsvReader" Version="4.0.0" />
11+
<PackageReference Include="SoftCircuits.CsvParser" Version="2.4.2" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<ProjectReference Include="..\..\src\CsvHelper\CsvHelper.csproj" />
1016
</ItemGroup>
1117

1218
</Project>

performance/CsvHelper.Performance/CsvHelper.licenseheader

-25
This file was deleted.

0 commit comments

Comments
 (0)