diff options
| author | 2013-06-14 14:43:18 -0700 | |
|---|---|---|
| committer | 2013-06-14 16:15:31 -0700 | |
| commit | a2934d5ff0b5c4098408cd583c2c259edf37c118 (patch) | |
| tree | 4c4d9800a68aa98a611913d14c6fa6cb17523792 /opengl/java | |
| parent | b28f8c82d92b06e7eba3bcb5b5c2e9757597a7c9 (diff) | |
Cache AndroidBlockGuardPolicy to avoid allocation.
Every incoming Binder call ends up triggering a BlockGuardPolicy
update, which would thrash between new AndroidBlockGuardPolicy
instances and BlockGuard.LAX_POLICY, causing GC churn.
This change avoids the extra allocations by recycling a single
AndroidBlockGuardPolicy in a ThreadLocal. Worst-case thrashing case
is now 10% faster; from 7.46us to 6.65us.
Bug: 9424568
Change-Id: I9c3b1c097a2aecc9b1f109a824cf3ea319fb3393
Diffstat (limited to 'opengl/java')
0 files changed, 0 insertions, 0 deletions