Skip to content

Commit

Permalink
fix: decrease max buffered amount
Browse files Browse the repository at this point in the history
From experimental testing, 16MB is too big for Chrome to handle,
when sending large amounts of data - the `bufferedamountlow` never
fires.

Lower it to 10MB which seems to work better when running the Helia
transport benchmarks.
  • Loading branch information
achingbrain committed Jul 19, 2024
1 parent 73f2b6b commit 3bfa9b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/transport-webrtc/src/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface WebRTCStreamInit extends AbstractStreamInit, DataChannelOptions
/**
* How much can be buffered to the DataChannel at once
*/
export const MAX_BUFFERED_AMOUNT = 16 * 1024 * 1024
export const MAX_BUFFERED_AMOUNT = 10 * 1024 * 1024

/**
* How long time we wait for the 'bufferedamountlow' event to be emitted
Expand Down

0 comments on commit 3bfa9b6

Please sign in to comment.