improving menu render performance