The problem is that you didn't count the time to do the "cat" in your
overall benchmark.
Hence, the savings you present are purely hyptohetical, even if you
implement prefetching.

On Sun, Jun 20, 2010 at 4:31 PM, Tomei <tomei.ninge...@gmail.com> wrote:

> 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: 
> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to