Skip to content

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jul 23, 2025

🦟 Bug fix

Summary

In SimulationRunner, we initialize a worker pool but we never actually use it so it's pure overhead. In ServerPrivate we only use the worker pool if there are multiple simulation runners, so we can optimize for the most common use case of one runner.

Checklist

  • Signed all commits for DCO
  • 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)
  • 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: Remove this if GenAI was not used.

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.

In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey requested a review from mjcarroll as a code owner July 23, 2025 18:39
@github-actions github-actions bot added the 🪵 jetty Gazebo Jetty label Jul 23, 2025
@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Jul 23, 2025
@azeey azeey merged commit 5ce62a8 into gazebosim:main Jul 24, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Jul 24, 2025
@azeey
Copy link
Contributor Author

azeey commented Jul 24, 2025

@Mergifyio backport gz-sim9 gz-sim8

@mergify
Copy link
Contributor

mergify bot commented Jul 24, 2025

backport gz-sim9 gz-sim8

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jul 24, 2025
In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 5ce62a8)
mergify bot pushed a commit that referenced this pull request Jul 24, 2025
In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 5ce62a8)
azeey added a commit to azeey/gz-sim that referenced this pull request Jul 24, 2025
In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
azeey added a commit that referenced this pull request Aug 7, 2025
In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 5ce62a8)
azeey added a commit that referenced this pull request Aug 7, 2025
In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 5ce62a8)
azeey added a commit that referenced this pull request Aug 8, 2025
In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 5ce62a8)
azeey added a commit that referenced this pull request Aug 8, 2025
In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit 5ce62a8)
azeey added a commit that referenced this pull request Aug 18, 2025
* Refactor Transport service handlers

This removes a lot of repetitive code where a service handler simply
copies the message, creates and adds the associated command to a command
queue.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Also refactor code for advertising services

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add back missing function

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Update our usage of workerpools (#2995)

In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix linter issues

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix typo

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add missing constructor

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
mergify bot pushed a commit that referenced this pull request Oct 16, 2025
* Refactor Transport service handlers

This removes a lot of repetitive code where a service handler simply
copies the message, creates and adds the associated command to a command
queue.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Also refactor code for advertising services

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add back missing function

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Update our usage of workerpools (#2995)

In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix linter issues

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix typo

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add missing constructor

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit bf68eae)
mergify bot pushed a commit that referenced this pull request Oct 16, 2025
* Refactor Transport service handlers

This removes a lot of repetitive code where a service handler simply
copies the message, creates and adds the associated command to a command
queue.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Also refactor code for advertising services

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add back missing function

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Update our usage of workerpools (#2995)

In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix linter issues

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix typo

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add missing constructor

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit bf68eae)

# Conflicts:
#	src/systems/user_commands/UserCommands.cc
azeey added a commit that referenced this pull request Oct 17, 2025
* Refactor Transport service handlers

This removes a lot of repetitive code where a service handler simply
copies the message, creates and adds the associated command to a command
queue.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Also refactor code for advertising services

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add back missing function

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Update our usage of workerpools (#2995)

In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix linter issues

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix typo

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add missing constructor

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
azeey added a commit that referenced this pull request Oct 17, 2025
* Refactor Transport service handlers

This removes a lot of repetitive code where a service handler simply
copies the message, creates and adds the associated command to a command
queue.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Also refactor code for advertising services

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add back missing function

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Update our usage of workerpools (#2995)

In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix linter issues

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix typo

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add missing constructor

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit bf68eae)
azeey added a commit that referenced this pull request Oct 17, 2025
* Refactor Transport service handlers

This removes a lot of repetitive code where a service handler simply
copies the message, creates and adds the associated command to a command
queue.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Also refactor code for advertising services

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add back missing function

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Update our usage of workerpools (#2995)

In `SimulationRunner`, we initialize a worker pool but we never actually
use it so it's pure overhead. In `ServerPrivate` we only use the
worker pool if there are multiple simulation runners, so we can optimize
for the most common use case of one runner.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix linter issues

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Fix typo

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

* Add missing constructor

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪵 jetty Gazebo Jetty

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants