Skip to content

Commit

Permalink
disable size stats
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Mar 30, 2023
1 parent e0a6914 commit d49e5a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
15 changes: 10 additions & 5 deletions crates/re_arrow_store/src/store_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{

// ---

#[derive(Default, Debug)]
#[derive(Default, Debug, Clone)]
pub struct DataStoreStats {
pub total_timeless_rows: u64,
pub total_timeless_size_bytes: u64,
Expand Down Expand Up @@ -183,7 +183,7 @@ impl IndexedBucket {
col_insert_id,
col_row_id,
col_num_instances,
columns,
columns: _,
} = &*inner.read();

let control_size_bytes = std::mem::size_of_val(is_sorted)
Expand All @@ -193,7 +193,9 @@ impl IndexedBucket {
+ std::mem::size_of_val(col_row_id.as_slice())
+ std::mem::size_of_val(col_num_instances.as_slice());

let data_size_bytes = compute_columns_size_bytes(columns);
// TODO(#1738): computing size stats is insanely slow.
// let data_size_bytes = compute_columns_size_bytes(columns);
let data_size_bytes = 0;

control_size_bytes as u64 + data_size_bytes
}
Expand Down Expand Up @@ -222,7 +224,7 @@ impl PersistentIndexedTable {
col_insert_id,
col_row_id,
col_num_instances,
columns,
columns: _,
} = self;

let control_size_bytes = std::mem::size_of_val(ent_path)
Expand All @@ -231,7 +233,9 @@ impl PersistentIndexedTable {
+ std::mem::size_of_val(col_row_id.as_slice())
+ std::mem::size_of_val(col_num_instances.as_slice());

let data_size_bytes = compute_columns_size_bytes(columns);
// TODO(#1738): computing size stats is insanely slow.
// let data_size_bytes = compute_columns_size_bytes(columns);
let data_size_bytes = 0;

control_size_bytes as u64 + data_size_bytes
}
Expand All @@ -242,6 +246,7 @@ impl PersistentIndexedTable {
/// Computes the size in bytes of an entire table's worth of data.
///
/// Beware: this is costly!
#[allow(dead_code)]
fn compute_columns_size_bytes(columns: &IntMap<ComponentName, DataCellColumn>) -> u64 {
let keys = (columns.keys().len() * std::mem::size_of::<ComponentName>()) as u64;
let cells = columns
Expand Down
7 changes: 5 additions & 2 deletions crates/re_viewer/src/ui/memory_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ impl MemoryPanel {

ui.label(egui::RichText::new("Limits").italics());
ui.label("Row limit");
ui.label("Size limit");
ui.end_row();

let label_rows = |ui: &mut egui::Ui, num_rows| {
Expand All @@ -197,7 +196,11 @@ impl MemoryPanel {
}
};

ui.label("Indices:");
ui.label("Timeless:");
label_rows(ui, u64::MAX);
ui.end_row();

ui.label("Temporal:");
label_rows(ui, config.indexed_bucket_num_rows);
ui.end_row();
});
Expand Down

0 comments on commit d49e5a1

Please sign in to comment.