diff options
author | Daniel Sandler <dsandler@android.com> | 2010-04-13 16:23:58 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2010-04-14 14:36:10 -0400 |
commit | dca661236c73ecd819cfea964c6f8170e5cc40ae (patch) | |
tree | 5edc07d1ac493d27b0346928be18d605dc1df186 /src/com/android/launcher2/AllApps2D.java | |
parent | 7018d8e32761d65816c01f62b094e17e44c7ffb9 (diff) | |
download | android_packages_apps_Trebuchet-dca661236c73ecd819cfea964c6f8170e5cc40ae.tar.gz android_packages_apps_Trebuchet-dca661236c73ecd819cfea964c6f8170e5cc40ae.tar.bz2 android_packages_apps_Trebuchet-dca661236c73ecd819cfea964c6f8170e5cc40ae.zip |
Batch loading of icons for AllApps.
AllAppsList now maintains <data> and <added> in sorted
order, to amortize the cost of sorting the apps list over
multiple batches.
Launcher boosts thread priority on first launch, but we now
reduce thread priority to normal after the main workspace
has been drawn but before all apps are loaded.
Experimental feature: a short delay is introduced between
batches to help free up the CPU (as well as to show that we
are indeed batching apps).
Bug: 2562420
Change-Id: I2035ec3e819b4e7993a80c6d03bfad3914c95a7a
Diffstat (limited to 'src/com/android/launcher2/AllApps2D.java')
-rw-r--r-- | src/com/android/launcher2/AllApps2D.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AllApps2D.java b/src/com/android/launcher2/AllApps2D.java index 90c87fb18..eb7cd8333 100644 --- a/src/com/android/launcher2/AllApps2D.java +++ b/src/com/android/launcher2/AllApps2D.java @@ -50,6 +50,8 @@ public class AllApps2D private static final String TAG = "Launcher.AllApps2D"; + private static final int BATCH_SIZE = 6; // give us a few apps at a time + private Launcher mLauncher; private DragController mDragController; @@ -300,6 +302,10 @@ public class AllApps2D return -1; } + public int getAppBatchSize() { + return BATCH_SIZE; + } + public void dumpState() { ApplicationInfo.dumpApplicationInfoList(TAG, "mAllAppsList", mAllAppsList); } |