rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.34k stars 303 forks source link

Introduce cheaply clonable `ChunkStoreHandle` and `QueryCacheHandle` #7486

Open teh-cmc opened 1 week ago

teh-cmc commented 1 week ago

These are required for:

  1. Making it easy to construct and pass QueryEngines around:
    // TODO(cmc): This needs to be a refcounted type that can be easily be passed around: the ref has
    // got to go. But for that we need to generally introduce `ChunkStoreHandle` and `QueryCacheHandle`
    // first, and this is not as straightforward as it seems.
    pub struct QueryEngine<'a> {
      pub store: &'a ChunkStore,
      pub cache: &'a Caches,
    }
  2. Getting ingestion off of the main thread and parallelize it:
    • 4298

teh-cmc commented 4 days ago

@zehiko just hit that one as he was trying to integrate a QueryHandle/QueryEngine into an async Stream (which assumes multi-threaded environment, and therefore static lifetimes, etc).