зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1126129 - Only enable SQLite tracing when the right environment variable is set, r=asuth.
This commit is contained in:
Родитель
1ac680d086
Коммит
afaefae6c7
|
@ -647,6 +647,9 @@ Connection::initializeInternal(nsIFile* aDatabaseFile)
|
|||
if (!gStorageLog)
|
||||
gStorageLog = ::PR_NewLogModule("mozStorage");
|
||||
|
||||
// SQLite tracing can slow down queries (especially long queries)
|
||||
// significantly. Don't trace unless the user is actively monitoring SQLite.
|
||||
if (PR_LOG_TEST(gStorageLog, PR_LOG_DEBUG)) {
|
||||
::sqlite3_trace(mDBConn, tracefunc, this);
|
||||
|
||||
nsAutoCString leafName(":memory");
|
||||
|
@ -654,6 +657,7 @@ Connection::initializeInternal(nsIFile* aDatabaseFile)
|
|||
(void)aDatabaseFile->GetNativeLeafName(leafName);
|
||||
PR_LOG(gStorageLog, PR_LOG_NOTICE, ("Opening connection to '%s' (%p)",
|
||||
leafName.get(), this));
|
||||
}
|
||||
#endif
|
||||
|
||||
int64_t pageSize = Service::getDefaultPageSize();
|
||||
|
|
Загрузка…
Ссылка в новой задаче