-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add a cache for IMAP message in the database #2064
Conversation
A feature where we can really see the benefit of this is #17. Not all servers have support for threads and then it gets very expensive to calculate them on demand. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
7efdd58
to
2421fb3
Compare
92531d7
to
1b8a31a
Compare
fb17ad9
to
9a6cb9a
Compare
Co-authored-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
956da72
to
c287787
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Tested the latest release and works good enough.
Lets get this is so we can have small fixes again.
@@ -60,7 +60,7 @@ public function find(string $userId, int $accountId): MailAccount { | |||
} | |||
|
|||
/** | |||
* @param int $id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opsy?
This is something I've been wanting to do for a long time. So here it is. Or, well, just a few modifications towards a new architecture I would like to have with this app.
The problem
Right now this app operates on IMAP directly. Hence the performance and capabilities completely depend on the IMAP server and its implementation. This means on many accounts pagination and search is slow because SORT is not supported. We use Horde's cache driver but it doesn't really yield and noticeable performance boost.
The proposal
In addition to mailboxes #1956 we should keep a copy of message information in the database. Then we can display mailboxes (folders) very quickly, paginate through them and search for strings. We can keep the database sync'ed with Horde's sync mechanism. This means the sync would shift from browser->Nextcloud to Nextcloud->IMAP. That implies that we need a new mechanism for the front-end, but I have some ideas and it should be fairly simple to work that out.
Eventually it will make this app similar to how desktop apps work (in regards to storing data locally).
A rough list of things to do
Don't sync the virtual flagged inbox to diskfine for now. can be improved laterA list of ideas for follow-up features
Concerns
Things that might be problematic are
cc @nextcloud/mail @rullzer for early input/feedback