efl_ui_focus_manager_calc.c in dirty_add performs a lot of list searches that end in failure on potentially long lists. It's trying to remove list items that are frequently not there. Seems like this could made more efficient.
Sure, in the pathologically gruesome example in T6580, in a run that generates 111 frames that code generates 5985 full list walks that fail to find an item. The lists being walked are generally between 50 and 100 items long.
If it's just something as simple as having a bool on_list = EINA_TRUE to track this instead of doing O(n) lookups, it would be worthwhile.
The king of bogus list abuse is now efl_ui_focus_composition.c's _state_apply() which appears to be doing list searches on both line 45 and line 60 on potentially large lists.
Looks like in current runs of the previously mentioned test we're seeing 1276 calls to _state_apply() that hit the list walks, 110 of which take over 1ms in duration, and 1 outlier of 15+
The total time contribution of these list walks is about 195ms over 52 rendered frames. best case for 52 frames would be 832ms, so 195/832 is a pretty big deal.