Metrics: improve performance of stats:events.