Reserve storage for deleted_log_event_ids.
This commit is contained in:
parent
3ead2030f6
commit
b4658f3da3
@ -250,6 +250,7 @@ class TQueueImpl final : public TQueue {
|
|||||||
auto collect_deleted_event_ids_time = 0.0;
|
auto collect_deleted_event_ids_time = 0.0;
|
||||||
if (callback_ != nullptr) {
|
if (callback_ != nullptr) {
|
||||||
vector<uint64> deleted_log_event_ids;
|
vector<uint64> deleted_log_event_ids;
|
||||||
|
deleted_log_event_ids.reserve(size - keep_count);
|
||||||
for (auto it = q.events.begin(); it != end_it; ++it) {
|
for (auto it = q.events.begin(); it != end_it; ++it) {
|
||||||
auto &event = it->second;
|
auto &event = it->second;
|
||||||
if (event.log_event_id != 0) {
|
if (event.log_event_id != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user