When showing a maildir folder, if some messages do not adhere to the proper RFC2822 specification, aerc is slowed down, while showing error messages as, for example:
ERROR 2022/12/12 19:22:11.546359 worker.go:466: could not get message info: mail: missing '<' in msg-id
ERROR 2022/12/12 19:22:11.231045 worker.go:466: could not get message info: mail: missing '@' in msg-id
ERROR 2022/12/12 19:18:56.914947 worker.go:466: could not get message info: mail: invalid string
In a maildir account replicated from Gmail using offmap, of a total of >200k messages, I have around 4k messages that trigger those errors. When opening the "all mail" folder, aerc takes quite a lot of time, and the logs says that it is spending over 26s while reporting those errors.
Would it be possible to deal with wrongly specified messages more gracefully?
Or maybe those 26s are what it takes for reading the whole set of messages, and would not be reduced if there were no wrongly specified messages?
Update: the errors are reproduced upon events like activating threads, receiving a new email, opening a message, reloading the folder... In those cases, aerc is still responsive while the errors are being dumped to the log, but CPU goes to 100% during the process. Opening a message should not trigger a re-read of the folder, should it?