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

Profile the in-for-loop mutexing in the main for-loop of point reading #5

Open
petrapa6 opened this issue Jan 2, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@petrapa6
Copy link
Member

petrapa6 commented Jan 2, 2025

Investigate and profile whether these mutexes in pub_handler.cpp are not slowing down the pipeline. If yes, optimize the code.

@petrapa6 petrapa6 added the enhancement New feature or request label Jan 2, 2025
@petrapa6 petrapa6 added this to the Ready for onboard deployment milestone Jan 2, 2025
@veskrdan
Copy link

veskrdan commented Jan 24, 2025

Feature implemented in commit f114b65 and improved speed 2x.

Notes:

  • Mutexing in each for loop was indeed slowing the method down
  • Solution was to store points in reserved vector first and then append it to the storing vector with .insert()
  • No need for .reserve() here, since the final size can be calculated by the .insert() function

@petrapa6
Copy link
Member Author

@veskrdan How big was the speed gain during your tests?

@veskrdan
Copy link

@petrapa6 About 0.010 ms on average. The method was about 0.020 ms, now circa 0.010 ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants