Skip to content

Improve performance of ECM::Entit(y|ies)ByComponents and ECM::ChildrenByComponents (backport #3375)#3526

Open
mergify[bot] wants to merge 1 commit intogz-sim8from
mergify/bp/gz-sim8/pr-3375
Open

Improve performance of ECM::Entit(y|ies)ByComponents and ECM::ChildrenByComponents (backport #3375)#3526
mergify[bot] wants to merge 1 commit intogz-sim8from
mergify/bp/gz-sim8/pr-3375

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 7, 2026

🦟 Bug fix

Summary

This is a follow up optimization from Follow up from #3362 where components are retrieved from the view instead of via ECM::Component<T>, which is expensive. Since the view caches the components, access to these components has the same performance characteristics as ECM::Each.

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Generated-By: Gemini 3.0

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.


This is an automatic backport of pull request #3375 done by Mergify.

…drenByComponents` (#3375)

This is a follow up optimization from Follow up from #3362 where components are retrieved from the view instead of via `ECM::Component<T>`, which is expensive.  Since the view caches the components, access to these components has the same performance characteristics as `ECM::Each`.

Generated-By: Gemini 3.0

Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Co-authored-by: Luca Della Vedova <lucadv@intrinsic.ai>
(cherry picked from commit a5b6bca)

# Conflicts:
#	include/gz/sim/detail/EntityComponentManager.hh
@mergify mergify Bot requested a review from arjo129 as a code owner May 7, 2026 23:15
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented May 7, 2026

Cherry-pick of a5b6bca has failed:

On branch mergify/bp/gz-sim8/pr-3375
Your branch is up to date with 'origin/gz-sim8'.

You are currently cherry-picking commit a5b6bcaa.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   include/gz/sim/detail/EntityComponentManager.hh

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant