-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize event serialization with pre-allocated buffer (#2794)
* Optimize event serialization with pre-allocated buffer - Added event_buffer field to LlmpEventManager - Used to_slice instead of to_allocvec - Pre-allocated buffer size is 4KB Fixes #1082 * Fallback to to_allocvec in case of event_buffer overflow Also combined the shared logic between compressed & uncompressed event firing while keeping the same behavior * Made the initial event_buffer size to a const Also removed the unnecessary event_buffer.clear(), since we are already resizing it
- Loading branch information
Showing
1 changed file
with
45 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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