Skip to content

Commit a9bf8c9

Browse files
biggs0125natebiggs
andauthored
Decrease ring buffer size to 2^31 - 1 which is wasm limit (#9341)
--------- Co-authored-by: Nate Biggs <[email protected]>
1 parent 45f4f55 commit a9bf8c9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/devtools_app/lib/src/screens/performance/panes/timeline_events/timeline_events_controller.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,12 @@ class TimelineEventsController extends PerformanceFeatureController
8282
@visibleForTesting
8383
late final Uint8ListRingBuffer traceRingBuffer;
8484

85-
/// Size limit in GB for [traceRingBuffer] that determines when traces should
86-
/// be removed from the queue.
87-
final _traceRingBufferSize = convertBytes(
88-
1,
89-
from: ByteUnit.gb,
90-
to: ByteUnit.byte,
91-
).round();
85+
/// Size limit for [traceRingBuffer] that determines when traces should be
86+
/// removed from the queue.
87+
///
88+
/// Wasm sets a size limit on byte arrays of int32 max which is specifically
89+
/// 1 less than 1 << 31.
90+
final _traceRingBufferSize = (1 << 31) - 1;
9291

9392
/// Track events that we have received from the VM, but have not yet
9493
/// processed.

0 commit comments

Comments
 (0)