mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Add tracing to help in launcher load time profiling.
Bug: 195674813 Test: None Change-Id: I895a64bbba515ce7b7df8d093d40e0a5b6056d2e
This commit is contained in:
@@ -43,6 +43,7 @@ import android.content.pm.ShortcutInfo;
|
||||
import android.graphics.Point;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Trace;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.text.TextUtils;
|
||||
@@ -197,7 +198,12 @@ public class LoaderTask implements Runnable {
|
||||
TimingLogger logger = new TimingLogger(TAG, "run");
|
||||
try (LauncherModel.LoaderTransaction transaction = mApp.getModel().beginLoader(this)) {
|
||||
List<ShortcutInfo> allShortcuts = new ArrayList<>();
|
||||
loadWorkspace(allShortcuts);
|
||||
Trace.beginSection("LoadWorkspace");
|
||||
try {
|
||||
loadWorkspace(allShortcuts);
|
||||
} finally {
|
||||
Trace.endSection();
|
||||
}
|
||||
logASplit(logger, "loadWorkspace");
|
||||
|
||||
// Sanitize data re-syncs widgets/shortcuts based on the workspace loaded from db.
|
||||
@@ -225,7 +231,13 @@ public class LoaderTask implements Runnable {
|
||||
verifyNotStopped();
|
||||
|
||||
// second step
|
||||
List<LauncherActivityInfo> allActivityList = loadAllApps();
|
||||
Trace.beginSection("LoadAllApps");
|
||||
List<LauncherActivityInfo> allActivityList;
|
||||
try {
|
||||
allActivityList = loadAllApps();
|
||||
} finally {
|
||||
Trace.endSection();
|
||||
}
|
||||
logASplit(logger, "loadAllApps");
|
||||
|
||||
verifyNotStopped();
|
||||
|
||||
Reference in New Issue
Block a user