a bunch of allocation optimizations
This commit is contained in:
@ -86,6 +86,7 @@ int64_t FlowOnly::canSend(float time_delta) {
|
||||
|
||||
std::vector<FlowOnly::SeqIDType> FlowOnly::getTimeouts(void) const {
|
||||
std::vector<SeqIDType> list;
|
||||
list.reserve(_in_flight.size()/3); // we dont know, so we just guess
|
||||
|
||||
// after 3 rtt delay, we trigger timeout
|
||||
const auto now_adjusted = getTimeNow() - getCurrentDelay()*3.f;
|
||||
|
@ -672,6 +672,7 @@ bool NGCFT1::onEvent(const Events::NGCEXT_ft1_data_ack& e) {
|
||||
|
||||
{
|
||||
std::vector<CCAI::SeqIDType> seqs;
|
||||
seqs.reserve(e.sequence_ids.size());
|
||||
for (const auto it : e.sequence_ids) {
|
||||
// TODO: improve this o.o
|
||||
seqs.push_back({e.transfer_id, it});
|
||||
|
Reference in New Issue
Block a user