diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/persistance')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java index 6013ca7e9..152a59f94 100644 --- a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java @@ -7,6 +7,7 @@ import android.database.DatabaseUtils; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Environment; +import android.os.SystemClock; import android.util.Base64; import android.util.Log; @@ -862,6 +863,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { } public void writeRoster(final Roster roster) { + long start = SystemClock.elapsedRealtime(); final Account account = roster.getAccount(); final SQLiteDatabase db = this.getWritableDatabase(); db.beginTransaction(); @@ -878,6 +880,8 @@ public class DatabaseBackend extends SQLiteOpenHelper { db.endTransaction(); account.setRosterVersion(roster.getVersion()); updateAccount(account); + long duration = SystemClock.elapsedRealtime() - start; + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": persisted roster in " + duration + "ms"); } public void deleteMessagesInConversation(Conversation conversation) { |