Skip to content

Commit

Permalink
Break up app.rs into parts (#2303)
Browse files Browse the repository at this point in the history
### What
Part of:
* #2242

Breaks up `app.rs` into several files. This required adding `pub(crate)`
on some fields. I plan to remove that in a future PR, creating accessors
and helpers instead.

This PR doesn't change behavior; it just moves code around.

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2303

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/3ef7f88/docs
<!-- pr-link-docs:end -->
  • Loading branch information
emilk authored Jun 5, 2023
1 parent b7a34f7 commit 6d96d37
Show file tree
Hide file tree
Showing 18 changed files with 1,555 additions and 1,448 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion crates/re_data_ui/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ impl EntityDataUi for Tensor {
) {
re_tracing::profile_function!();

match ctx.cache.entry::<TensorDecodeCache>().entry(self.clone()) {
let decoded = ctx.cache.entry::<TensorDecodeCache>().entry(self.clone());
match decoded {
Ok(decoded) => {
let annotations = crate::annotations(ctx, query, entity_path);
tensor_ui(
Expand Down
4 changes: 2 additions & 2 deletions crates/re_space_view_spatial/src/scene/parts/images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ fn to_textured_rect(
let Some([height, width, _]) = tensor.image_height_width_channels() else { return None; };

let debug_name = ent_path.to_string();
let tensor_stats = ctx.cache.entry::<TensorStatsCache>().entry(tensor);
let tensor_stats = *ctx.cache.entry::<TensorStatsCache>().entry(tensor);

match gpu_bridge::tensor_to_gpu(
ctx.render_ctx,
&debug_name,
tensor,
tensor_stats,
&tensor_stats,
&ent_context.annotations,
) {
Ok(colormapped_texture) => {
Expand Down
Loading

1 comment on commit 6d96d37

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.25.

Benchmark suite Current: 6d96d37 Previous: b7a34f7 Ratio
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/default 400 ns/iter (± 1) 305 ns/iter (± 5) 1.31
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/default 289 ns/iter (± 0) 225 ns/iter (± 0) 1.28
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/default 446 ns/iter (± 25) 351 ns/iter (± 10) 1.27
datastore/num_rows=1000/num_instances=1000/gc/default 2568713 ns/iter (± 6007) 1724642 ns/iter (± 3255) 1.49
mono_points_arrow/decode_message_bundles 83239603 ns/iter (± 1116523) 63727901 ns/iter (± 2451545) 1.31
mono_points_arrow_batched/generate_message_bundles 34962264 ns/iter (± 347492) 18634584 ns/iter (± 100640) 1.88
mono_points_arrow_batched/generate_messages 7084706 ns/iter (± 711872) 3684541 ns/iter (± 15230) 1.92
mono_points_arrow_batched/encode_log_msg 615415 ns/iter (± 1563) 412965 ns/iter (± 1560) 1.49
mono_points_arrow_batched/encode_total 32470258 ns/iter (± 2523755) 23401958 ns/iter (± 186331) 1.39
mono_points_arrow_batched/decode_log_msg 513534 ns/iter (± 8009) 320308 ns/iter (± 881) 1.60
mono_points_arrow_batched/decode_message_bundles 13190827 ns/iter (± 225846) 7447649 ns/iter (± 43805) 1.77
mono_points_arrow_batched/decode_total 13252612 ns/iter (± 419289) 7824726 ns/iter (± 51356) 1.69
batch_points_arrow/encode_log_msg 96943 ns/iter (± 946) 56377 ns/iter (± 187) 1.72
batch_points_arrow/encode_total 377340 ns/iter (± 5594) 289505 ns/iter (± 261) 1.30
batch_points_arrow/decode_log_msg 70771 ns/iter (± 1225) 45823 ns/iter (± 111) 1.54
batch_points_arrow/decode_total 75651 ns/iter (± 231) 50939 ns/iter (± 159) 1.49
arrow_mono_points/insert 2825874109 ns/iter (± 41157331) 1784412697 ns/iter (± 9411059) 1.58
arrow_mono_points/query 1354328 ns/iter (± 16952) 962503 ns/iter (± 2139) 1.41
arrow_batch_points/query 16116 ns/iter (± 34) 12117 ns/iter (± 15) 1.33
arrow_batch_vecs/query 446275 ns/iter (± 255) 315085 ns/iter (± 531) 1.42

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.