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

Generate fewer .cpp files: Inline forward serialization of transparent components to their respective datatypes #5544

Merged
merged 6 commits into from Mar 18, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Mar 15, 2024

What

  • don't generate fill_arrow_array_builder_method if it's not needed
  • inline fully transparent components whose serialization is implemented by a datatypes (that's most of them!) -> removes lots of cpp files, thus cutting down compile times and amount of code

@ reviewer: all the interesting changes are crates/re_types_builder/src/codegen/cpp/mod.rs, everything else is just an example

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@Wumpf Wumpf changed the title Fewer cpp files: Inline forward serialization of transparent componets to their respective datatypes Fewer cpp files: Inline forward serialization of transparent components to their respective datatypes Mar 15, 2024
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Very nice! But needs to re-add that forward declaration

@@ -15,6 +15,26 @@ namespace rerun {
return datatype;
}

Result<std::shared_ptr<arrow::Array>> Loggable<blueprint::components::ColumnShare>::to_arrow(
Copy link
Member

Choose a reason for hiding this comment

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

did you change the order of the functions just to get a bigger diff ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

lol yeah I thought about avoiding that but it just happened because the last function is now optionally appended to the vec of methods on Loggable. It's annoying but 🤷

@Wumpf Wumpf merged commit 3bf45c4 into main Mar 18, 2024
40 checks passed
@Wumpf Wumpf deleted the andreas/less-cpp-codgen branch March 18, 2024 09:42
Wumpf added a commit that referenced this pull request Mar 18, 2024
…5557)

### What

Hitting some spurious asan issues on ci: Some Linux runs end up spamming
`AddressSanitizer:DEADLYSIGNAL` indefinitely with no additional
information.

Originally I suspected this came from
* #5544

But it's actually a Github image issue, see
actions/runner-images#9491

### 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)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5557/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5557/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5557/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5557)
- [Docs
preview](https://rerun.io/preview/8ac1180d749f9bf9ae62ee57f96c66c832758a9d/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/8ac1180d749f9bf9ae62ee57f96c66c832758a9d/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
@emilk emilk changed the title Fewer cpp files: Inline forward serialization of transparent components to their respective datatypes Generate fewer .cpp files: Inline forward serialization of transparent components to their respective datatypes Apr 5, 2024
@emilk emilk added the 📉 performance Optimization, memory use, etc label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C or C++ logging API include in changelog 📉 performance Optimization, memory use, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants