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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 src/Npgsql/Internal/Converters/JsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public override ValueTask WriteAsync(PgWriter writer, T? value, CancellationToke
static class JsonConverter
{
public const byte JsonbProtocolVersion = 1;
// We pick a value that is the largest multiple of 4096 that is still smaller than the large object heap threshold (85K).
const int StreamingThreshold = 81920;
// Largest value that is a power of 2 and a multiple of 4096 while staying under the large object heap threshold (85K).
Comment thread
NinoFloris marked this conversation as resolved.
const int StreamingThreshold = 65536;

public static bool TryReadStream(bool jsonb, Encoding encoding, PgReader reader, out int byteCount, [NotNullWhen(true)]out Stream? stream)
{
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.