event queue optimizations #144
Closed
Labels
Comments
|
coming back to this after doing some related work with lockfree SPSC queues, i don't think they are a good fit for this situation - they will tend to increase contention. since we don't have hard realtime deadlines, the mutexes are fine and should have insignificant overhead when contention doesn't happen. the problem of course is when contention does happen - this would be when a script is doing some blocking operation during an event handler. and that just shouldn't be allowed to happen (see issue #461) however, the allocation when posting events really is bad! events should use an object pool. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
notes from @catfact extracted from readme
and mutexinggoing on in the event queue.callocto get anevent_dataunion. since it is a union, its a good candidate for object-pool model.- threads : each read and write to the event queue is protected by a mutex. it is probably not a big deal, but would be better to have at least lock-free reads. (not sure how possible this really is)The text was updated successfully, but these errors were encountered: