From 57bd1f7daf074fead1cf2833b47267a2e759daa1 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 9 May 2014 14:47:10 +1200 Subject: [PATCH] -Fixed performance issue serializing XML document with a large number of nodes --- .../Bson/BsonReaderTests.cs | 2 +- .../Newtonsoft.Json.Tests.Net20.csproj | 11 + .../Newtonsoft.Json.Tests.Net40.csproj | 7 +- .../Newtonsoft.Json.Tests.Portable.csproj | 7 +- .../Newtonsoft.Json.Tests.Portable40.csproj | 7 +- .../Newtonsoft.Json.Tests.WinRT.csproj | 9 + .../Newtonsoft.Json.Tests.csproj | 8 +- Src/Newtonsoft.Json.Tests/PerformanceTests.cs | 27 + .../Properties/AssemblyInfo.cs | 2 +- Src/Newtonsoft.Json.Tests/large_sample.xml | 31775 ++++++++++++++++ .../Converters/XmlNodeConverter.cs | 40 +- .../Properties/AssemblyInfo.cs | 2 +- 12 files changed, 31878 insertions(+), 19 deletions(-) create mode 100644 Src/Newtonsoft.Json.Tests/large_sample.xml diff --git a/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs b/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs index 81a497a9..344abd11 100644 --- a/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs +++ b/Src/Newtonsoft.Json.Tests/Bson/BsonReaderTests.cs @@ -1432,7 +1432,7 @@ namespace Newtonsoft.Json.Tests.Bson } } -#if !(NET20 || NET35 || NETFX_CORE) +#if !(NETFX_CORE) public void Utf8Text() { string badText = System.IO.File.ReadAllText(@"PoisonText.txt"); diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj index b2666c95..d6c44749 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj @@ -315,6 +315,17 @@ true + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + +