Opened 11 years ago
Closed 10 years ago
#5952 closed Feature Requests (fixed)
interprocess::message_queue priority forces linear insert time
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.47.0 | Severity: | Optimization |
Keywords: | Cc: |
Description
interprocess::message_queue uses a priority queue for ordering messages, which is fine, except that many applications don't have any use for the priority feature, and would rather use a straight FIFO queue.
The reason this matters is that when using messages with all the same priority, each addition to the queue requires a linear complexity insertion.
Seems that there should be an option to not provide a message priority, and let the message queue use something more like a ring/circular buffer with low overhead and constant insertion time.
Note:
See TracTickets
for help on using tickets.
I've just committed (revision 79898) an implementation that uses a circular buffer as index and optimizes common lookups for uses cases without priority usage. It should be much faster.