mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-28 20:47:39 +00:00
topjohnwu
f0533fca70
Simplify su_info cache
The previous implementation is great if multiple different requesters call su rapidly in a very short period of time, however in the real world this is nearly impossible to happen. This comes with quite a big overhead, since it requires two lists and also an everlasting background thread to constantly maintain the lists. The new implementation will spawn a collector thread for each cache miss, and the thread will terminate itself once the data is invalidated.
Description
Languages
C++
36.6%
Kotlin
30.4%
Rust
16.4%
Java
9%
Shell
4.9%
Other
2.6%