From 41352492e978441e2fce10d9b6476402e570d464 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Wed, 9 Oct 2024 18:17:14 +0200 Subject: [PATCH] Do not cache static entries in the query-time latest-at cache (#7654) Manually tested on some known user-provided problematic dataset. Works as advertised. * Fixes #7552 --- crates/store/re_query/src/latest_at.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/store/re_query/src/latest_at.rs b/crates/store/re_query/src/latest_at.rs index 374af3dcde87..25c350cb16aa 100644 --- a/crates/store/re_query/src/latest_at.rs +++ b/crates/store/re_query/src/latest_at.rs @@ -683,7 +683,9 @@ impl LatestAtCache { }) .clone(); - if query.at() != data_time { + // NOTE: Queries that return static data are much cheaper to run, and polluting the query-time cache + // just to point to the static tables again and again is very wasteful. + if query.at() != data_time && !data_time.is_static() { per_query_time .entry(query.at()) .or_insert_with(|| LatestAtCachedChunk {