-
Notifications
You must be signed in to change notification settings - Fork 10
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
Avoid creating a dedicated tf thread #97
Conversation
This marginaly improves cpu usage, and avoids the creation of an unnecessary thread. Lookup for tf transforms without a timeout, as it's not allowed if not using a dedicated thread. It's also not necessary in this case, as we're using a message filter that makes sure that the callback is called when the transforms are available. Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, LGTM
Maybe the commit and the PR name should both be "Avoid creating a dedicated tf thread" ?
nit: maybe adding this rationale shaped as a comment at the point where the listener is created would be useful:
|
That was the name I thought I wrote 😂 |
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixed when squash-merging |
Related to #35 (comment)
Summary
This marginaly improves cpu usage, and avoids the creation of an unnecessary thread.
It also changes the code to lookup for tf transforms without a timeout, as it's not allowed if not using a dedicated thread.
It's also not necessary in this case, as we're using a message filter that makes sure that the callback is called when the transforms are available.
Checklist