[SERVER-63677] Consider using `boost::multimap` to maintain timers for `BatonASIO` Created: 15/Feb/22  Updated: 15/Mar/23

Status: Open
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Amirsaman Memaripour Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:
Story Points: 2

 Description   

The networking baton uses two separate data structures to maintain scheduled timers:

// The set is used to find the next timer which will fire.  The unordered_map looks up the
// timers so we can remove them in O(1)
std::multimap<Date_t, Timer> _timers;
stdx::unordered_map<size_t, decltype(_timers)::iterator> _timersById;

Consider using boost::multimap to maintain the timers and reduce the complexity of keeping _timers and _timersById consistent.


Generated at Thu Feb 08 05:58:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.