Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a70cee

Browse filesBrowse files
committed
Fix LOH threshold value
Closes #5978
1 parent c746805 commit 1a70cee
Copy full SHA for 1a70cee

1 file changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Npgsql/Internal/Converters/JsonConverter.cs‎

Copy file name to clipboardExpand all lines: src/Npgsql/Internal/Converters/JsonConverter.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ public override ValueTask WriteAsync(PgWriter writer, T? value, CancellationToke
107107
static class JsonConverter
108108
{
109109
public const byte JsonbProtocolVersion = 1;
110-
// We pick a value that is the largest multiple of 4096 that is still smaller than the large object heap threshold (85K).
111-
const int StreamingThreshold = 81920;
110+
// Largest value that is a power of 2 and a multiple of 4096 while staying under the large object heap threshold (85K).
111+
const int StreamingThreshold = 65536;
112112

113113
public static bool TryReadStream(bool jsonb, Encoding encoding, PgReader reader, out int byteCount, [NotNullWhen(true)]out Stream? stream)
114114
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.