diff --git a/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonBenchmarkDataTypes.cs b/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonBenchmarkDataTypes.cs index 67dce2c7f16..964cb4f6a76 100644 --- a/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonBenchmarkDataTypes.cs +++ b/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonBenchmarkDataTypes.cs @@ -320,9 +320,13 @@ public sealed class DeepPocoRoot public sealed class DeepPocoNode { + [BsonIgnoreIfNull] public DeepPocoNode right { get; set; } + [BsonIgnoreIfNull] public DeepPocoNode left { get; set; } + [BsonIgnoreIfNull] public string rightValue { get; set; } + [BsonIgnoreIfNull] public string leftValue { get; set; } } diff --git a/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonDecodingBenchmark.cs b/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonDecodingBenchmark.cs index 9495675f233..d91802a21b4 100644 --- a/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonDecodingBenchmark.cs +++ b/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonDecodingBenchmark.cs @@ -80,6 +80,6 @@ public IEnumerable BenchmarkDataSources() => [ new("extended_bson/flat_bson.json", "Flat", 75_310_000, typeof(FlatPoco)), new("extended_bson/full_bson.json", "Full", 57_340_000, typeof(FullPoco)), - new("extended_bson/deep_bson.json", "Deep", 19_640_000, typeof(DeepPocoRoot)) + new("extended_bson/deep_bson.json", "Deep", 22_840_000, typeof(DeepPocoRoot)) ]; } diff --git a/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonEncodingBenchmark.cs b/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonEncodingBenchmark.cs index c0f6cba087e..2f4f862c9f1 100644 --- a/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonEncodingBenchmark.cs +++ b/benchmarks/MongoDB.Driver.Benchmarks/Bson/BsonEncodingBenchmark.cs @@ -82,6 +82,6 @@ public IEnumerable BenchmarkDataSources() => [ new("extended_bson/flat_bson.json", "Flat", 75_310_000, typeof(FlatPoco)), new("extended_bson/full_bson.json", "Full", 57_340_000, typeof(FullPoco)), - new("extended_bson/deep_bson.json", "Deep", 19_640_000, typeof(DeepPocoRoot)) + new("extended_bson/deep_bson.json", "Deep", 22_840_000, typeof(DeepPocoRoot)) ]; }