Open peci1 opened 4 years ago
Okay, this simple case is solved by #469. But there's also a great performance loss due to the error string construction in lookupTransform
where you can't choose to not construct the strings. I'm just thinking about an interface that would allow to tell that the user is not interested in the error string, but just in the exception type...
extrapolation_error_string
https://github.com/ros/geometry2/blob/035522926403613d6f04f148cb18cc64d2544c19/tf2/src/buffer_core.cpp#L361is only read when
error_string
is non-null: https://github.com/ros/geometry2/blob/035522926403613d6f04f148cb18cc64d2544c19/tf2/src/buffer_core.cpp#L461-L466However, even when
error_string
is null, pointer toextrapolation_error_string
is still passed togather()
, which means the stringstream operations are performed no matter what the value oferror_string
is.And the string operations aren't exactly cheap (this is a flamegraph from a profiler, x axis is total time accumulated over all calls to the function):