rsimmonsjr / axiom

Implementation of a highly-scalable and ergonomic actor model for Rust
Other
184 stars 21 forks source link

Optimize dispatcher handling for actors that get lots of small messages. #69

Closed rsimmonsjr closed 5 years ago

rsimmonsjr commented 5 years ago

Rather than doing only one message at a time, it would be more efficient if a dispatcher thread would perform work up to a certain configurable time limit. The default might be 1 millisecond If a message takes less than that, the dispatcher thread should handle the next message for the actor, if any, and the next and so on until it gets to the timeout.

While adding this issue the developer will need to add a configurable time_slice to set the time in nanoseconds and then a configurable time_slice_max which will serve as an upper bound for the time a message executes, beyond this level the system should log a warning.

rsimmonsjr commented 5 years ago

Implemented