reduce cpu utilization by eliminating unneeded freeze/unfreeze calls

This commit is contained in:
Felix Kratz 2022-08-21 12:20:41 +02:00
parent 4da74adf6c
commit 3ababcdab3
2 changed files with 7 additions and 5 deletions

View file

@ -237,4 +237,3 @@ bool alias_parse_sub_domain(struct alias* alias, FILE* rsp, struct token propert
} }
return false; return false;
} }

View file

@ -456,10 +456,13 @@ void bar_manager_update(struct bar_manager* bar_manager, bool forced) {
forced, forced,
NULL ); NULL );
} }
bar_manager_freeze(bar_manager);
bar_manager->frozen = false; if (needs_refresh) {
if (needs_refresh) bar_manager_refresh(bar_manager, false); bar_manager_freeze(bar_manager);
bar_manager_unfreeze(bar_manager); bar_manager->frozen = false;
bar_manager_refresh(bar_manager, false);
bar_manager_unfreeze(bar_manager);
}
} }
void bar_manager_reset(struct bar_manager* bar_manager) { void bar_manager_reset(struct bar_manager* bar_manager) {