Add thread-local MessageTypeSupport cache to rmw_deserialize#560
Add thread-local MessageTypeSupport cache to rmw_deserialize#560mjcarroll wants to merge 3 commits into
Conversation
- Implemented symmetric thread-local cache for MessageTypeSupport objects - Avoids expensive per-call regex_replace and stringstream overhead - Improves small message deserialization by 11-24x
This reverts commit baa85c9.
- Implemented symmetric thread-local cache for MessageTypeSupport objects - Avoids expensive per-call regex_replace and stringstream overhead - Improves small message deserialization by 11-24x
biodranik
left a comment
There was a problem hiding this comment.
While PR description sounds great, it is impossible to review due to unnecessary code formatting changes.
Please make a commit with only necessary/related changes using the same formatting code style.
| /* Set to > 0 for printing warnings to stderr for each messages that was taken more than this many | ||
| ms after writing */ | ||
| /* Set to > 0 for printing warnings to stderr for each messages that was taken | ||
| more than this many ms after writing */ |
There was a problem hiding this comment.
Please use the same column count/width as in the original code for formatter.
| #define RET_NULL_X(var, code) do {if (!var) {RET_ERR_X(#var " is null", code);}} while (0) | ||
| #define RET_ALLOC_X(var, code) do {if (!var) {RET_ERR_X("failed to allocate " #var, code);} \ | ||
| } while (0) | ||
| #define RET_ERR_X(msg, code) \ |
There was a problem hiding this comment.
There is no need to reformat everything, please either set up/use the same clang-format style as in the original code.
Yeah, don't know what happened there, here is the scoped PR: #561 |
This PR adds a symmetric thread-local cache for MessageTypeSupport objects in rmw_deserialize. This avoids the expensive per-call regex_replace and stringstream overhead in the MessageTypeSupport constructor.