Merge "Improve stats_event memory usage"