Skip to content

Commit

Permalink
Stop playback when we reach the end of the data (#2085)
Browse files Browse the repository at this point in the history
Previously we would get stuck in "Play" mode, which is both weird
and wasteful
  • Loading branch information
emilk committed May 11, 2023
1 parent 50e0026 commit 3abd1c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/re_viewer_context/src/time_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ impl TimeControl {
.or_insert_with(|| TimeState::new(full_range.min));

if self.looping == Looping::Off && state.time >= full_range.max {
// Don't pause or rewind, just stop moving time forward
// until we receive more data!
// This is important for "live view".
// We've reached the end - stop playing.
state.time = full_range.max.into();
self.pause();
return;
}

Expand Down

1 comment on commit 3abd1c1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.25.

Benchmark suite Current: 3abd1c1 Previous: 1ae501b Ratio
mono_points_arrow/decode_message_bundles 72592403 ns/iter (± 767438) 57405936 ns/iter (± 1646700) 1.26
mono_points_arrow_batched/generate_message_bundles 28161121 ns/iter (± 614411) 18390915 ns/iter (± 785589) 1.53
mono_points_arrow_batched/generate_messages 5329339 ns/iter (± 427508) 4016978 ns/iter (± 57522) 1.33
mono_points_arrow_batched/encode_total 33783569 ns/iter (± 1103827) 23490847 ns/iter (± 1126824) 1.44

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.