Improved performance of the menu drawing