Skip to content
Open
Changes from 3 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
6 changes: 6 additions & 0 deletions src/proto/streams/prioritize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,12 @@ impl Prioritize {
tracing::trace!("poll_complete");

loop {
// Create a new span at the start of the loop to avoid continuously
// adding events to the same span due to tracing in the loop, which
// would lead to an ongoing increase in memory usage.
let span = tracing::debug_span!("poll_complete_loop");
let _e = span.enter();

if let Some(mut stream) = self.pop_pending_open(store, counts) {
self.pending_send.push_front(&mut stream);
self.try_assign_capacity(&mut stream);
Expand Down