Hello, It seems package scanning speed is greatly influenced by IO buffering:
I did some simple experiment. I am testing with a fresh build so there are NO apps under /data/app. First boot up the phone. Then do either (A) or (B): (A): # stop # sync; echo 3 > /proc/sys/vm/drop_caches # start (B): # stop # sync; echo 3 > /proc/sys/vm/drop_caches # cat /system/app/*.apk > /dev/null # start case (A): I/PackageManager( 3114): Time to scan packages: 12.668 seconds case (B): I/PackageManager( 3189): Time to scan packages: 7.032 seconds Can PackageManagerService be easily reworked so that it pre-fetches the buffers for the "next app to scan" in a separate thread? I can't just blindly run a "cat /system/app/*.apk > /dev/null" before package scanning happens, because doing so would cost more time than the saving indicated from above .... Thanks! -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
