(material) Reduce CPU usage in big lists by 3

The program spent more time clearing rich_label and entry_value than
fetching it's value from the menu system and rendering it on the screen.
This commit is contained in:
Higor Eurípedes 2016-10-08 11:28:25 -03:00
parent 85135d64b6
commit 392bcfd98b
1 changed files with 4 additions and 2 deletions

View File

@ -662,10 +662,12 @@ static void mui_render_menu_list(mui_handle_t *mui,
{
int y;
size_t selection;
char rich_label[PATH_MAX_LENGTH] = {0};
char entry_value[PATH_MAX_LENGTH] = {0};
char rich_label[PATH_MAX_LENGTH];
char entry_value[PATH_MAX_LENGTH];
bool entry_selected = false;
rich_label[0] = entry_value[0] = '\0';
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
continue;