Skip to content

Commit

Permalink
clear by cutoff only when not targeting wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
zrezke committed May 27, 2023
1 parent 5964055 commit d711152
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/re_data_store/src/log_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ impl LogDb {
}

/// Free up some RAM by forgetting parts of the time that are more than `cutoff` ns in the past.
#[cfg(not(target_arch = "wasm32"))]
pub fn clear_by_cutoff(&mut self, cutoff: i64) {
let cutoff_time = Time::now().nanos_since_epoch() - cutoff;
let oldest = self.entity_db.data_store.oldest_time_per_timeline();
Expand Down
1 change: 1 addition & 0 deletions crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ impl App {
}
}

#[cfg(not(target_arch = "wasm32"))]
for log_db in self.log_dbs.values_mut() {
log_db.clear_by_cutoff(2e9 as i64);
}
Expand Down

0 comments on commit d711152

Please sign in to comment.