Skip to content

Commit

Permalink
Set default MAX_MESSAGES_PER_READ to 16 (java-native-access#601)
Browse files Browse the repository at this point in the history
Motivation:

We should use a more sane default value then 1 for MAX_MESSAGES_PER_READ
that also match our other Channel implementations

Modifications:

Use 16 as default value

Result:

Less overhead and more consistent
  • Loading branch information
normanmaurer authored Nov 2, 2023
1 parent 2a9a923 commit b9e04c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void operationComplete(ChannelFuture channelFuture) {
}
};

private static final ChannelMetadata METADATA = new ChannelMetadata(false);
private static final ChannelMetadata METADATA = new ChannelMetadata(false, 16);
private final long[] readableStreams = new long[128];
private final long[] writableStreams = new long[128];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* {@link QuicStreamChannel} implementation that uses <a href="https://github.com/cloudflare/quiche">quiche</a>.
*/
final class QuicheQuicStreamChannel extends DefaultAttributeMap implements QuicStreamChannel {
private static final ChannelMetadata METADATA = new ChannelMetadata(false);
private static final ChannelMetadata METADATA = new ChannelMetadata(false, 16);
private static final InternalLogger LOGGER = InternalLoggerFactory.getInstance(QuicheQuicStreamChannel.class);
private final QuicheQuicChannel parent;
private final ChannelId id;
Expand Down

0 comments on commit b9e04c8

Please sign in to comment.