We've identified a hotspot in our code using CCR timers. It appears that if we enqueue many thousands of timers that the code suffers terminal slowdown.
The fix is to choose the soonest scheduled item and enqueue a timer for this event. When it fires, we repeat. In this way, we're only ever enqueueing one timer interval at a time.
What we're finding now is that the SortedList instance which we're using to manage the scheduled items is burning with the weight of the removals from the list.
Do all .net timers suffer from the problem of increased CPU usage with the number of items enqueued, or is there one that is more intelligently written.
Alternatively, is there a better suited data structure for keeping our scheduled items in ordered fashion, that supports fast insertion and fast removal from the front of the list?