Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 85e49ba0 authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

[res] Optimize locale comparison and alias search

1. Locale comparison doesn't need to happen if the locales
   aren't set at all, and an early check skips the function
   call overhead

2. Staging resource aliases only exist for Framework resources,
   and are constrained to a pretty short range. Given that
   the binary search in STL doesn't check for the value to be
   inside the array, most of the alias searches end up hitting
   the worst case with the full log2(n) of halvings before they
   fail to find it. An early check speeds up the resource
   lookups by a whopping 10-15%.

Bug: 345562237
Test: build, boot, atest + performance tests
Change-Id: Ifd2c12c74df4b21a81609102291e6aabe38c2670
parent 8fb681e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment