-
Notifications
You must be signed in to change notification settings - Fork 101
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
High logging overhead #364
Comments
I would be glad to make a PR, but I'm a little confused with idea of implementing string-to-int map type which is almost complete copy-paste of string-to-string map. Could you suggest, which solution did you have in mind? |
@almaslov thanks for the issue. I think this is all about rcutils/resource/logging_macros.h.em Lines 66 to 75 in 8da2aac
I do not have solid idea for this problem. but i would suggest that we should avoid these checks every time. Probably after the initialization, there should be some mechanism to notify the update to the logger, so that we can avoid these all checks. any thoughts? |
Sounds interesting. The only thing that comes to mind is saving timestamp when global logging state is updated. Logging macro could look something like this:
So |
I took a quick look at this as well. I think there are several problems in here:
I'm not sure I understand your latest proposal. If we had some kind of global logging update timestamp, wouldn't we just be throttling messages? While that certainly would help, we already have the |
@clalancette Thanks for reply.
This global logging update timestamp, say Actually now I see that there is no way to handle global log level change trough |
Hello!
I was profiling some nodes in my project recently and noticed an issue in case of high incoming messages rate(~2-3K hz). In this case
rcl_wait
consumes significant amount of CPU. About 30-50% ofrcl_wait
execution time isrcutils_logging_logger_is_enabled_for
:It looks like most of overhead can be eliminated by removing
rcutils_logging_severity_level_from_string
and switching to integrallog_level
as mentioned in comment here and hereThe text was updated successfully, but these errors were encountered: