improved speed of menu build