Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Apr 5, 2023
1 parent d631367 commit f91c16d
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 25 deletions.
4 changes: 0 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ polars-core = "0.27.1"
polars-lazy = "0.27.1"
polars-ops = "0.27.1"
puffin = "0.14"
smallvec = { version = "1.0", features = ["const_generics", "union"] }
thiserror = "1.0"
time = { version = "0.3", features = ["wasm-bindgen"] }
tinyvec = { version = "1.6", features = ["alloc", "rustc_1_55"] }
tokio = "1.24"
wgpu = { version = "0.15.1", default-features = false }
wgpu-core = { version = "0.15.1", default-features = false }
Expand Down
4 changes: 1 addition & 3 deletions crates/re_arrow_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ indent = "0.1"
itertools = { workspace = true }
nohash-hasher = "0.2"
parking_lot.workspace = true
smallvec = { version = "1.0", features = ["const_generics", "union"] }
smallvec.workspace = true
static_assertions = "1.1"
thiserror.workspace = true

Expand Down Expand Up @@ -83,8 +83,6 @@ polars-core = { workspace = true, features = [
"sort_multiple",
] }
rand = "0.8"
smallvec = { version = "1.0", features = ["const_generics", "union"] }
tinyvec = { version = "1.6", features = ["alloc", "rustc_1_55"] }


[lib]
Expand Down
18 changes: 5 additions & 13 deletions crates/re_arrow_store/src/store_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,7 @@ impl IndexedBucket {
// find the secondary row number, and the associated cells.
let mut secondary_row_nr = primary_row_nr;
while column[secondary_row_nr as usize].is_none() {
secondary_row_nr -= 1;
if secondary_row_nr < 0 {
if secondary_row_nr == 0 {
trace!(
kind = "latest_at",
%primary,
Expand All @@ -711,6 +710,7 @@ impl IndexedBucket {
);
return None;
}
secondary_row_nr -= 1;
}

trace!(
Expand Down Expand Up @@ -1047,19 +1047,11 @@ impl PersistentIndexedTable {
// for building the returned iterator.
crate::profile_function!();

// TODO(cmc): Cloning these is obviously not great and will need to be addressed at
// some point.
// But, really, it's not _that_ bad either: these are either integers or erased pointers,
// and e.g. with the default configuration there are only 1024 of them (times the number
// of components).
let row_id = self.col_row_id.clone();
let mut columns = self.columns.clone(); // shallow

let cells = (0..self.total_rows()).filter_map(move |row_nr| {
let mut cells = [(); N].map(|_| None);
for (i, component) in components.iter().enumerate() {
if let Some(column) = columns.get_mut(component) {
cells[i] = column[row_nr as usize].take();
if let Some(column) = self.columns.get(component) {
cells[i] = column[row_nr as usize].clone();
}
}

Expand All @@ -1069,7 +1061,7 @@ impl PersistentIndexedTable {
return None;
}

let row_id = row_id[row_nr as usize];
let row_id = self.col_row_id[row_nr as usize];

trace!(
kind = "range",
Expand Down
2 changes: 1 addition & 1 deletion crates/re_int_histogram/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all-features = true


[dependencies]
smallvec = "1.10"
smallvec.workspace = true
static_assertions = "1.1"


Expand Down
2 changes: 1 addition & 1 deletion crates/re_log_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ndarray.workspace = true
nohash-hasher = "0.2"
num-derive = "0.3"
num-traits = "0.2"
smallvec = { version = "1.10", features = ["union"] }
smallvec.workspace = true
thiserror.workspace = true
time = { workspace = true, default-features = false, features = [
"formatting",
Expand Down
2 changes: 1 addition & 1 deletion crates/re_memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ itertools = { workspace = true }
nohash-hasher = "0.2"
once_cell = "1.16"
parking_lot.workspace = true
smallvec = "1.10"
smallvec.workspace = true

# native dependencies:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/re_renderer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ macaw.workspace = true
ordered-float = "3.2"
parking_lot.workspace = true
slotmap = "1.0.6"
smallvec = "1.10"
smallvec.workspace = true
static_assertions = "1.1"
thiserror.workspace = true
type-map = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ rfd = { version = "0.11.3", default_features = false, features = [
] }
serde = { version = "1", features = ["derive"] }
slotmap = { version = "1.0.6", features = ["serde"] }
smallvec = { version = "1.10", features = ["serde"] }
smallvec.workspace = true
thiserror.workspace = true
time = { workspace = true, default-features = false, features = ["formatting"] }
uuid = { version = "1.1", features = ["serde", "v4", "js"] }
Expand Down

0 comments on commit f91c16d

Please sign in to comment.