-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search query slowness due to athor replacement #1520
Comments
I have the same issue. It doesn't need to be encrypted though, signed messages trigger this as well. Quite a lot of time is spent loading the email's from disk, and in gpg (getting the key and verifying signatures). None of this seems necessary, and is a regression from previous versions. I might have a look later on. These are the top calls:
|
A bisect resulted in 036f30e |
I guess this is the issue: diff --git a/alot/db/message.py b/alot/db/message.py
index 02c059f6..9f5fafb5 100644
--- a/alot/db/message.py
+++ b/alot/db/message.py
@@ -10,7 +10,7 @@ from datetime import datetime
from notmuch import NullPointerError
from . import utils
-from .utils import extract_body
+from .utils import get_body_part, extract_body_part
from .utils import decode_header
from .attachment import Attachment
from .. import helper
@@ -68,6 +68,8 @@ class Message:
else:
self._from = '"Unknown" <>'
+ self.mime_part = get_body_part(self.get_email())
+
def __str__(self):
"""prettyprint the message"""
aname, aaddress = self.get_author()
@@ -263,8 +265,7 @@ class Message:
def get_body_text(self):
""" returns bodystring extracted from this mail """
- # TODO: allow toggle commands to decide which part is considered body
- return extract_body(self.get_email())
+ return extract_body_part(self.mime_part) |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If thread_authors_replace_me is set every search buffer reload will need to read every single email from disk. This makes the search very slow mostly in the case of a lot of encrypted emails.
Software Versions
To Reproduce
thread_authors_replace_me
to trueI'm personally happy to keep
thread_authors_replace_me
to false in my setup, if I'm the only one affected by it we can close the issue.The text was updated successfully, but these errors were encountered: