pub struct FallbackPolicy {
pub ratio_threshold: f64,
pub min_delta_for_fallback: usize,
}Expand description
Policy for deciding when a view should fall back to full recomputation.
If the delta set is large relative to the materialized view, incremental processing may be slower than just recomputing everything. The threshold is configurable per-domain.
Fields§
§ratio_threshold: f64If delta_size / materialized_size exceeds this ratio, fall back. Default: 0.5 (50% — delta is more than half the full view).
min_delta_for_fallback: usizeAbsolute minimum delta size before considering fallback. Prevents fallback on tiny views where ratio is noisy. Default: 10.
Implementations§
Source§impl FallbackPolicy
impl FallbackPolicy
Sourcepub fn should_fallback(
&self,
delta_size: usize,
materialized_size: usize,
) -> bool
pub fn should_fallback( &self, delta_size: usize, materialized_size: usize, ) -> bool
Whether the view should fall back to full recomputation.
Trait Implementations§
Source§impl Clone for FallbackPolicy
impl Clone for FallbackPolicy
Source§fn clone(&self) -> FallbackPolicy
fn clone(&self) -> FallbackPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FallbackPolicy
impl Debug for FallbackPolicy
Auto Trait Implementations§
impl Freeze for FallbackPolicy
impl RefUnwindSafe for FallbackPolicy
impl Send for FallbackPolicy
impl Sync for FallbackPolicy
impl Unpin for FallbackPolicy
impl UnsafeUnpin for FallbackPolicy
impl UnwindSafe for FallbackPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more