@@ -306,10 +306,6 @@ synchronized void setLastSqlStatement(String sql) {
306306 /** Used to find out where this object was created in case it never got closed. */
307307 private final Throwable mStackTrace ;
308308
309- // System property that enables logging of slow queries. Specify the threshold in ms.
310- private static final String LOG_SLOW_QUERIES_PROPERTY = "db.log.slow_query_threshold" ;
311- private final int mSlowQueryThreshold ;
312-
313309 /** stores the list of statement ids that need to be finalized by sqlite */
314310 private final ArrayList <Integer > mClosedStatementIds = new ArrayList <Integer >();
315311
@@ -1559,11 +1555,6 @@ public Cursor rawQueryWithFactory(
15591555 String editTable ) {
15601556 verifyDbIsOpen ();
15611557 BlockGuard .getThreadPolicy ().onReadFromDisk ();
1562- long timeStart = 0 ;
1563-
1564- if (false || mSlowQueryThreshold != -1 ) {
1565- timeStart = System .currentTimeMillis ();
1566- }
15671558
15681559 SQLiteDatabase db = getDbConnection (sql );
15691560 SQLiteCursorDriver driver = new SQLiteDirectCursorDriver (db , sql , editTable );
@@ -1574,24 +1565,6 @@ public Cursor rawQueryWithFactory(
15741565 cursorFactory != null ? cursorFactory : mFactory ,
15751566 selectionArgs );
15761567 } finally {
1577- if (false || mSlowQueryThreshold != -1 ) {
1578-
1579- // Force query execution
1580- int count = -1 ;
1581- if (cursor != null ) {
1582- count = cursor .getCount ();
1583- }
1584-
1585- long duration = System .currentTimeMillis () - timeStart ;
1586-
1587- if (false || duration >= mSlowQueryThreshold ) {
1588- Log .v (SQLiteCursor .TAG ,
1589- "query (" + duration + " ms): " + driver .toString () + ", args are "
1590- + (selectionArgs != null
1591- ? TextUtils .join ("," , selectionArgs )
1592- : "<null>" ) + ", count is " + count );
1593- }
1594- }
15951568 releaseDbConnection (db );
15961569 }
15971570 return cursor ;
@@ -1967,7 +1940,6 @@ private SQLiteDatabase(String path, CursorFactory factory, int flags,
19671940 setMaxSqlCacheSize (DEFAULT_SQL_CACHE_SIZE );
19681941 mFlags = flags ;
19691942 mPath = path ;
1970- mSlowQueryThreshold = SystemProperties .getInt (LOG_SLOW_QUERIES_PROPERTY , -1 );
19711943 mStackTrace = new DatabaseObjectNotClosedException ().fillInStackTrace ();
19721944 mFactory = factory ;
19731945 mPrograms = new WeakHashMap <SQLiteClosable ,Object >();
0 commit comments