Best way to build a 500 item menu

I get it that the menu is generated via queries, hence the bottlenecks. If things don’t change too often, it’s much more efficient to build it manually (or simply just copy the generated html and paste it back instead of source). If things do change often, cache it.