Cache Magisk app ID for performance

This commit is contained in:
topjohnwu
2021-09-20 05:47:15 -07:00
parent 4f0bced53e
commit 82c7662cdf
3 changed files with 33 additions and 1 deletions

View File

@ -276,6 +276,7 @@ static void inotify_handler(pollfd *pfd) {
} u{};
read(pfd->fd, u.buf, sizeof(u.buf));
if (u.event.name == "packages.xml"sv) {
cached_manager_app_id = -1;
exec_task([] {
mutex_guard lock(data_lock);
rebuild_map();