summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Nicolo' Mazzucato <nicomazz@google.com> 2024-01-26 14:59:45 +0000
committer Nicolo' Mazzucato <nicomazz@google.com> 2024-01-30 22:06:49 +0000
commita7cff51593f67ba18dcf60a94156223fff415b45 (patch)
tree2594eb4a96ce73e039874436596e36afbe8cefcc /libs/androidfw/misc.cpp
parent907c616757e7c42d85705c7de896b8c95df7b0d0 (diff)
Limit concurrency SysUI bg coroutine dispatcher
This limits the number of threads the systemui bg coroutine dispatcher can use. Before this change, the limit was the max between "kotlinx.coroutines.io.parallelism" and the number of cpus. In sysui we found traces with >40 threads and a lot of thread list lock contention. As the lock contention was also bocking the main thread, it ended up causing jank. The more SysUI switches work to be scheduled in the background, the more jank there would have been. The value of available processor has been identified comparing unbounded, 5 and 10 bg threads. Available processors seem to provide the best values in terms of lock contention and jank. Bug: 322437228 Bug: 321027720 Flag: None as this is fixing a recent regression already in the field. Test: performance tests Change-Id: I5b160fd69b8f3357d582420ef6713ae8cc2a43aa
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions