Move indexing into the Search Fragment
Cold start latency for Settings increased drastically from the indexing of the Search Database. Moving it into the Search Fragment moves that latency to cases where users are actually searching. Change-Id: I11368af610ac9e80f9901654f980c2c1e26342a5 Fixes: 34142852 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -85,10 +85,11 @@ public class SearchFeatureProviderImpl implements SearchFeatureProvider {
|
||||
public void updateIndex(Context context) {
|
||||
long indexStartTime = System.currentTimeMillis();
|
||||
if (isEnabled(context)) {
|
||||
getIndexingManager(context).update();
|
||||
getIndexingManager(context).indexDatabase();
|
||||
} else {
|
||||
Index.getInstance(context).update();
|
||||
}
|
||||
Log.d(TAG, "Index.update() took " + (System.currentTimeMillis() - indexStartTime) + " ms");
|
||||
Log.d(TAG, "IndexDatabase() took " +
|
||||
(System.currentTimeMillis() - indexStartTime) + " ms");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user