Feature/rec faster callbacks#2573
Draft
KerstinKeller wants to merge 4 commits intomasterfrom
Draft
Conversation
| { | ||
| } | ||
|
|
||
| ~ReceiveDispatchThread() |
Contributor
There was a problem hiding this comment.
warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions]
Suggested change
| ~ReceiveDispatchThread() | |
| ~ReceiveDispatchThread() override |
| { | ||
| } | ||
|
|
||
| ~ReceiveDispatchThread() |
Contributor
There was a problem hiding this comment.
warning: use '= default' to define a trivial destructor [modernize-use-equals-default]
app/rec/rec_client_core/src/ecal_rec_impl.cpp:80:
- {
- }
+ = default;| no_items = ecal_rec_impl.receive_dispatch_queue_.try_dequeue_bulk(token, frames.data(), frames.size()); | ||
| for (size_t i = 0; i < no_items; ++i) | ||
| { | ||
| auto& frame = frames[i]; |
Contributor
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index]
auto& frame = frames[i];
^| // Add to the pre-buffer (it is thread-safe by using a mutex internally) | ||
| for (size_t i = 0; i < no_items; ++i) | ||
| { | ||
| ecal_rec_impl.pre_buffer_.push_back(frames[i]); |
Contributor
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index]
ecal_rec_impl.pre_buffer_.push_back(frames[i]);
^
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
eCAL does not buffer any data. This is why it's extremly important for the eCAL recorder, to leave the data callbacks as quickly as possible.
At the moment, when recording, there might be as much as 3 locks that need to be locked when data arrives.
This might lead to congestion, if a lot of data is being sent simultaneously.
This PR addresses this issue by first forwarding the data to a concurrent queue, and doing all other processing from a different thread.