Bug 709078 - Add logging for awesomebar query times. r=lucasr

This commit is contained in:
Wes Johnston 2012-01-11 10:53:39 -08:00
parent 21790739ea
commit 7de822afca

View File

@ -622,7 +622,15 @@ public class AwesomeBarTabs extends TabHost {
mAllPagesCursorAdapter.setFilterQueryProvider(new FilterQueryProvider() {
public Cursor runQuery(CharSequence constraint) {
ContentResolver resolver = mContext.getContentResolver();
return BrowserDB.filter(resolver, constraint, MAX_RESULTS);
long start = new Date().getTime();
Cursor c = BrowserDB.filter(resolver, constraint, MAX_RESULTS);
c.getCount(); // ensure the query runs at least once
long end = new Date().getTime();
Log.i(LOGTAG, "Got cursor in " + (end - start) + "ms");
return c;
}
});