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

Remove depth png image write on grab loop #164

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

ezamoraa
Copy link
Contributor

When doing a performance test I found this image write taking most of the CPU cycles for the grab thread loop. Attaching the CPU FlameGraph for reference.

zedGrab_flamegraph

Signed-off-by: Esteban Zamora <esteban.zamora.al@gmail.com>
@ezamoraa
Copy link
Contributor Author

@Myzhar please take a look

@@ -5886,7 +5886,6 @@ void ZedCamera::retrieveVideoDepth()
sl::ERROR_CODE::SUCCESS ==
mZed.retrieveMeasure(mMatDepth, sl::MEASURE::DEPTH, sl::MEM::CPU, mMatResol);
mSdkGrabTS = mMatDepth.timestamp;
mMatDepth.write("depth_map.png");
Copy link
Member

Choose a reason for hiding this comment

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

Good catch 👍
This comes from an old debugging session :(

@Myzhar
Copy link
Member

Myzhar commented Jun 28, 2023

The tool you used seems interesting. What did you use?
We are enhancing the ROS 2 Wrapper CI with a benchmarking test and it could be useful

@Myzhar Myzhar merged commit 1a39a87 into stereolabs:master Jun 28, 2023
@ezamoraa
Copy link
Contributor Author

ezamoraa commented Jun 28, 2023

@Myzhar check this resource regarding flame graphs: https://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html. These are generated from perf profiling data (https://www.brendangregg.com/perf.html#TimedProfiling). The visualizer I used is https://www.speedscope.app/. 😄

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

Successfully merging this pull request may close these issues.

2 participants