Skip to content

Commit

Permalink
forgot about em pesky indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Apr 19, 2024
1 parent d0a221e commit 5115102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
10 changes: 4 additions & 6 deletions crates/re_query/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ pub use self::visible_history::{ExtraQueryHistory, VisibleHistory, VisibleHistor
pub use self::cache::{CacheKey, Caches};
pub use self::cache_stats::{CachedComponentStats, CachesStats};
pub use self::flat_vec_deque::{ErasedFlatVecDeque, FlatVecDeque};
pub use self::latest_at::{
LatestAtComponentResults, CachedLatestAtMonoResult, LatestAtResults,
};
pub use self::range::{RangeComponentResults, CachedRangeData, RangeResults};
pub use self::latest_at::{CachedLatestAtMonoResult, LatestAtComponentResults, LatestAtResults};
pub use self::range::{CachedRangeData, RangeComponentResults, RangeResults};

pub(crate) use self::latest_at::LatestAtCache;
pub(crate) use self::range::{RangeComponentResultsInner, RangeCache};
pub(crate) use self::range::{RangeCache, RangeComponentResultsInner};

pub mod external {
pub use paste;
Expand Down Expand Up @@ -149,5 +147,5 @@ pub fn cacheable(component_name: re_types::ComponentName) -> bool {
.into()
});

!not_cacheable.contains(&component_name)
!component_name.is_indicator_component() && !not_cacheable.contains(&component_name)
}
15 changes: 2 additions & 13 deletions crates/re_query/src/range/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use re_types_core::ComponentName;
use re_types_core::SizeBytes;

use crate::{
CacheKey, RangeComponentResults, RangeComponentResultsInner, RangeResults,
Caches, Promise,
CacheKey, Caches, Promise, RangeComponentResults, RangeComponentResultsInner, RangeResults,
};

// ---
Expand Down Expand Up @@ -164,21 +163,11 @@ impl RangeCache {
re_tracing::profile_scope!("range", format!("{query:?}"));

let RangeCache {
cache_key,
cache_key: _,
per_data_time,
pending_invalidation: _,
} = self;

// No point in caching indicator components in range queries.
if cache_key.component_name.is_indicator_component() {
return per_data_time.clone();
}

use re_types_core::Loggable as _;
if cache_key.component_name == re_types_core::components::InstanceKey::name() {
return per_data_time.clone();
}

let mut per_data_time = per_data_time.write();

let query_front = per_data_time.compute_front_query(query);
Expand Down

0 comments on commit 5115102

Please sign in to comment.