Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always log all components of Transform3D #7111

Merged
merged 23 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ We are in active development.
There are many features we want to add, and the API is still evolving.
_Expect breaking changes!_

Current shortcomings that we are working on:
Some shortcomings:
* [Multi-million point clouds are slow](https://github.com/rerun-io/rerun/issues/1136)
* [Logging many tiny things (e.g. scalars) has a lot of overhead](https://github.com/rerun-io/rerun/issues/5967)
* [The viewer slows down where there are too many entities](https://github.com/rerun-io/rerun/issues/7115)
emilk marked this conversation as resolved.
Show resolved Hide resolved
* The data you want to visualize must fit in RAM
- See <https://www.rerun.io/docs/howto/limit-ram> for how to bound memory use.
- We plan on having a disk-based data store some time in the future.
Expand Down
3 changes: 2 additions & 1 deletion crates/build/re_types_builder/src/codegen/cpp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::{
objects::ObjectClass,
ArrowRegistry, Docs, ElementType, GeneratedFiles, Object, ObjectField, ObjectKind, Objects,
Reporter, Type, ATTR_CPP_NO_FIELD_CTORS, ATTR_CPP_RENAME_FIELD,
ATTR_RERUN_LOG_MISSING_AS_EMPTY,
};

use self::array_builder::{arrow_array_builder_type, arrow_array_builder_type_object};
Expand Down Expand Up @@ -1581,7 +1582,7 @@ fn archetype_serialize(type_ident: &Ident, obj: &Object, hpp_includes: &mut Incl
};

// TODO(andreas): Introducing MonoCollection will remove the need for distinguishing these two cases.
if field.is_nullable {
if field.is_nullable && !obj.attrs.has(ATTR_RERUN_LOG_MISSING_AS_EMPTY) {
quote! {
if (#field_accessor.has_value()) {
auto result = ComponentBatch::from_loggable(#field_accessor.value());
Expand Down
7 changes: 4 additions & 3 deletions crates/build/re_types_builder/src/codegen/python/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use crate::{
objects::ObjectClass,
ArrowRegistry, CodeGenerator, Docs, ElementType, GeneratedFiles, Object, ObjectField,
ObjectKind, Objects, Reporter, Type, ATTR_PYTHON_ALIASES, ATTR_PYTHON_ARRAY_ALIASES,
ATTR_RERUN_LOG_MISSING_AS_EMPTY,
};

use self::views::code_for_view;
Expand Down Expand Up @@ -572,10 +573,10 @@ fn code_for_struct(
} else if *kind == ObjectKind::Archetype {
// Archetypes use the ComponentBatch constructor for their fields
let (typ_unwrapped, _) = quote_field_type_from_field(objects, field, true);
if field.is_nullable {
format!("converter={typ_unwrapped}Batch._optional, # type: ignore[misc]\n")
if field.is_nullable && !obj.attrs.has(ATTR_RERUN_LOG_MISSING_AS_EMPTY) {
format!("converter={typ_unwrapped}Batch._optional, # type: ignore[misc]\n")
} else {
format!("converter={typ_unwrapped}Batch._required, # type: ignore[misc]\n")
format!("converter={typ_unwrapped}Batch._required, # type: ignore[misc]\n")
}
} else if !default_converter.is_empty() {
code.push_indented(0, &converter_function, 1);
Expand Down
Loading
Loading