WIP: event queue optimization.