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

Commit 390a2080 authored by Yusuke Sato's avatar Yusuke Sato
Browse files

Initialize NativeLibraryHelper.Handle with |pkg|

to not parse the same apk file again in NativeLibraryHelper.
This will make derivePackageAbi() 2.5x faster. Previously,
derivePackageAbi() took ~330ms to process ~100 system packages
on volantis-userdebug. With this CL, it takes about ~130ms.

Bug: 22063656
Change-Id: I56d7af0ece3030247e2552c34a1007e79279988c
parent 34344210
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6978,7 +6978,7 @@ public class PackageManagerService extends IPackageManager.Stub {
        NativeLibraryHelper.Handle handle = null;
        try {
            handle = NativeLibraryHelper.Handle.create(scanFile);
            handle = NativeLibraryHelper.Handle.create(pkg);
            // TODO(multiArch): This can be null for apps that didn't go through the
            // usual installation process. We can calculate it again, like we
            // do during install time.