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

Skip to content
Commit 9f410f0a authored by Dominik Laskowski's avatar Dominik Laskowski
Browse files

SF: Avoid allocation on hot path to IF

The number of layer stacks and listeners is small, and the predominant
operations are lookup and iteration respectively, so store them on the
stack contiguously to avoid hashing/allocation/indirection.

Preallocate the WindowInfo and DisplayInfo vectors, since reallocating
the former involves copying strings and fiddling with sp<> ref counts.

Bug: 185536303
Test: simpleperf
Test: WindowInfosListenerTest
Change-Id: I5d1d1fc3b2639a4ee5056697e1a3581c11174173
parent 99a9750a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment