Skip to content

Commit

Permalink
self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Apr 23, 2024
1 parent 9db9a99 commit eff4db7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
10 changes: 3 additions & 7 deletions crates/re_space_view_text_log/src/visualizer_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,14 @@ impl VisualizerSystem for TextLogSystem {
view_query: &ViewQuery<'_>,
_view_ctx: &ViewContextCollection,
) -> Result<Vec<re_renderer::QueueableDrawData>, SpaceViewSystemExecutionError> {
let store = ctx.recording_store();
let query_caches2 = ctx.recording().query_caches2();
let resolver = ctx.recording().resolver();

// We want everything, for all times:
let query = re_data_store::RangeQuery::new(view_query.timeline, TimeRange::EVERYTHING);

for data_result in view_query.iter_visible_data_results(ctx, Self::identifier()) {
re_tracing::profile_scope!("primary", &data_result.entity_path.to_string());

let results = query_caches2.range(
store,
let results = ctx.recording().query_caches2().range(
ctx.recording_store(),
&query,
&data_result.entity_path,
[Text::name(), TextLogLevel::name(), Color::name()],
Expand Down Expand Up @@ -116,7 +112,7 @@ impl VisualizerSystem for TextLogSystem {
}

{
// Sort by currently selected tiemeline
// Sort by currently selected timeline
re_tracing::profile_scope!("sort");
self.entries.sort_by_key(|e| e.time);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ fn load_series(
) -> Result<(), QueryError> {
re_tracing::profile_function!();

let store = ctx.recording_store();
let query_caches2 = ctx.recording().query_caches2();
let resolver = ctx.recording().resolver();

let annotation_info = annotations
Expand Down Expand Up @@ -197,8 +195,8 @@ fn load_series(
let entity_path = &data_result.entity_path;
let query = re_data_store::RangeQuery::new(query.timeline, time_range);

let results = query_caches2.range(
store,
let results = ctx.recording().query_caches2().range(
ctx.recording_store(),
&query,
entity_path,
[Scalar::name(), Color::name(), StrokeWidth::name()],
Expand Down Expand Up @@ -333,7 +331,7 @@ fn load_series(
data_result,
time_per_pixel,
points,
store,
ctx.recording_store(),
query,
series_name,
all_series,
Expand Down
16 changes: 9 additions & 7 deletions crates/re_space_view_time_series/src/point_visualizer_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ impl VisualizerSystem for SeriesPointSystem {
.map(ToOwned::to_owned)
.collect::<ComponentNameSet>();
query_info.queried.append(&mut series_point_queried);
query_info.queried.insert(StrokeWidth::name());
query_info.indicators = std::iter::once(SeriesPoint::indicator().name()).collect();
query_info
}
Expand Down Expand Up @@ -100,8 +99,6 @@ impl SeriesPointSystem {
) -> Result<(), QueryError> {
re_tracing::profile_function!();

let store = ctx.recording_store();
let query_caches2 = ctx.recording().query_caches2();
let resolver = ctx.recording().resolver();

let (plot_bounds, time_per_pixel) = determine_plot_bounds_and_time_per_pixel(ctx, query);
Expand Down Expand Up @@ -152,11 +149,16 @@ impl SeriesPointSystem {
let entity_path = &data_result.entity_path;
let query = re_data_store::RangeQuery::new(query.timeline, time_range);

let results = query_caches2.range(
store,
let results = ctx.recording().query_caches2().range(
ctx.recording_store(),
&query,
entity_path,
[Scalar::name(), Color::name(), StrokeWidth::name()],
[
Scalar::name(),
Color::name(),
MarkerSize::name(),
MarkerShape::name(),
],
);

let all_scalars = results
Expand Down Expand Up @@ -323,7 +325,7 @@ impl SeriesPointSystem {
data_result,
time_per_pixel,
points,
store,
ctx.recording_store(),
query,
series_name,
&mut self.all_series,
Expand Down

0 comments on commit eff4db7

Please sign in to comment.