From 876d478ad7f7b4d10df6c8f1cf86667540ef6662 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 11 Jul 2013 16:11:36 -0400 Subject: [PATCH] Opening a folder (especially in threaded mode) does a very heavy SQL query. This method doesn't use or modify the folder object. Don't cargo-cult the Open here. (cketti may well tell me I'm wrong about this. Happy to listen & fix) --- src/com/fsck/k9/mail/store/LocalStore.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/com/fsck/k9/mail/store/LocalStore.java b/src/com/fsck/k9/mail/store/LocalStore.java index a4d0621c2..9de4458ed 100644 --- a/src/com/fsck/k9/mail/store/LocalStore.java +++ b/src/com/fsck/k9/mail/store/LocalStore.java @@ -1521,10 +1521,6 @@ public class LocalStore extends Store implements Serializable { @Override public int getUnreadMessageCount() throws MessagingException { - if (!isOpen()) { - open(OpenMode.READ_WRITE); - } - try { return database.execute(false, new DbCallback() { @Override