Allow PM to scan directories in parallel.
Starting PM during boot is expensive, with about a third of the time spent in trawling system directories and processing the packages inside. PM currently parallelizes package scanning/parsing within each directory, but directories themselves are processed in sequence (with package installs being the blocker). This means that large or otherwise slow-to-process packages will block boot even when there are scan/parse tasks in other directories that can be carried out. This change updates PM to scan all directories in parallel, with packages being installed in the order that they were scanned. This eliminates the slack when moving between directories, or ~55ms (245ms -> 189ms). Test: build, flash, boot, measure improvement in latency Bug: 401622806 Flag: android.content.pm.parallel_package_parsing_across_system_dirs Change-Id: Ia155741beab4541dea16e78dee73a2e453dc2d64
Loading
Please register or sign in to comment