improve menu rendering performance
Merge pull request #2672 from dimagi/fast-menu

improve menu rendering performance