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

Skip to content
Commit a7cff515 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

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
parent 907c6167
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