Skip to content

Various performance optimizations#287

Closed
DanBmh wants to merge 4 commits into
basler:jazzyfrom
DanBmh:opts2
Closed

Various performance optimizations#287
DanBmh wants to merge 4 commits into
basler:jazzyfrom
DanBmh:opts2

Conversation

@DanBmh

@DanBmh DanBmh commented Feb 18, 2026

Copy link
Copy Markdown

This is a follow up of #262, but now for the current jazzy branch version.

  • Even though it is stated in the readme, the status publishers are not disabled by default (or only somewhere else).
  • The check for the removed camera took 1.05ms in my renewed tests. How did you measure the "unsignificant" in the comment? I have measured my time here with the sync offset (Sync with system time #286), because the check happens before grabbing, the header timestamps were 1ms off. It is not detectable in the ros2 topic delay, because it is not in the image grabbing process, but might result in a trigger slowdown at high frame rates.
  • I don't have a value for the encoding changes this time, because it is just reducing the sleep duration.
  • The optimized postprocessing gave me 1.3ms speedup.

Regarding the discussion in the old PR:

  • Removing the camera and plugging it in again still does not work for me (using docker + usb camera). Has this been tested? I also think the trade-off between this (rarely used?) functionality and the performance improvement is better for the second option.
  • Is changing the chunk mode and the encoding at runtime a frequent use-case? And if it really is, maybe an alternative option could be to call these functions only once after a change (using some boolean flag) and not every frame.

Feel free to ask any questions you have, or cherry-picking any single commits.

FrancoisPicardDTI added a commit that referenced this pull request May 4, 2026
…duce CPU overhead + Extend test_set_image_encoding integration test
FrancoisPicardDTI added a commit that referenced this pull request May 4, 2026
…duce CPU overhead + Extend test_set_image_encoding integration test
@FrancoisPicardDTI

Copy link
Copy Markdown
Collaborator

Hello @DanBmh
Thank you for the different suggestions and contributions:

  • You are right about the status publishers. It is now corrected. Thank you for that.
  • I cannot remove the camera removed test, which is a required feature for the Pylon driver. But please feel free to remove it with your local version of course. On my side, the "IsCamRemoved" function execution
  • Same comment for the encoding change at runtime feature.
  • Thank you for the optimization, which I have now included in jazzy and kilted.

To answer your additional comments:

  • The implementation has not been tested in a docker container. Work in progress.
  • These features are required for the driver - cam removal and encoding change.

Thank you again for these useful changes! I am closing these pull requests. The changes have been implemented ad-hoc and pushed on GitHub.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants