Optimizing menu rendering