Skip to content

Implement the jwz threading algorithm#3355

Merged
GretaD merged 2 commits into
masterfrom
enhancement/jwt-threading
Jul 8, 2020
Merged

Implement the jwz threading algorithm#3355
GretaD merged 2 commits into
masterfrom
enhancement/jwt-threading

Conversation

@ChristophWurst

@ChristophWurst ChristophWurst commented Jul 7, 2020

Copy link
Copy Markdown
Member

Extracted from #2125 to make the PR more reviewable.

This is basically an implementation of https://www.jwz.org/doc/threading.html but using a few tricks from https://tools.ietf.org/html/rfc5256 like the root container (as opposed to a list of root containers).

The algorithm here doesn't do anything yet, the integration will follow with #2125. All this patch is add the algorithm and a set of tests that ensure some basic cases work as expected. I would say we have to see if and how well it works and take a closer look once we have the real data. On paper it's a bit hard to reason about the correctness. But not crashing is already a good achievement I guess.

For those who really want to dig into it I left comments for the respective sections on https://www.jwz.org/doc/threading.html in each of the sections of the algorithm. On a high level there is one method that builds the threads and that splits the complexity in five private methods for each of the main steps.

Ref https://github.com/nextcloud/mail/projects/11#card-41435877

Comment thread lib/IMAP/Threading/ThreadBuilder.php Outdated
Comment thread lib/IMAP/Threading/ThreadBuilder.php
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst force-pushed the enhancement/jwt-threading branch from fe96b73 to d68a894 Compare July 8, 2020 08:40

@nickvergessen nickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦈 The shark approves

@GretaD GretaD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coool

@GretaD GretaD merged commit 4d78b95 into master Jul 8, 2020
@GretaD GretaD deleted the enhancement/jwt-threading branch July 8, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants