Remove extra settings write on package replace
During a package replace for non-system packages, commitPackagesLocked runs executeDeletePackagesLIF, followed by updateSettingsLI. Both methods call Settings#writeLPr internally, causing the entire packages.xml file to be re-generated twice in a row. Removing the extra call typically saves 40-50ms on my mostly-empty Pixel 3 with a 1 MB /data/system/packages.xml. I assume the savings scale up with slower hardware & more apps installed. Bug: 138450974 Test: Manually verified packages.xml is identical after install as compared to an unchanged build. Change-Id: Ibeeec9e5ff1ca60c2368f4faab2f1d3ab3d3497e
Loading
Please register or sign in to comment