]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg/Dispatcher: simplify and optimize the `marrival` tree 60359/head
authorMax Kellermann <max.kellermann@ionos.com>
Wed, 16 Oct 2024 10:51:04 +0000 (12:51 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Wed, 16 Oct 2024 15:21:31 +0000 (17:21 +0200)
commit9276d24355d3484312af097209481e0163dbd2ff
treefc61626d564a7e5244cc0db20711e7f843134e3b
parentde709e12aa5001ba1210b597f2afb5d5814b0e34
msg/Dispatcher: simplify and optimize the `marrival` tree

This replaces the two containers `marrival` and `marrival_map` which
needs lookups with one single `std::multiset` and eliminates all
lookups completely; only `add_arrival()` ever needs to walk the tree.

To do that, an iterator field is added to `class QueueItem` which is
later used to erase the `std::multiset` item.

This is not only simpler and faster, but also smaller: the resulting
binary is 2.5 kB smaller.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/msg/DispatchQueue.cc
src/msg/DispatchQueue.h