Menu callback optimization.