Skip to content
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

Large complex mails are slow to display #759

Merged
merged 4 commits into from
May 25, 2023

Conversation

adrien-coye
Copy link
Contributor

@adrien-coye adrien-coye commented May 25, 2023

Investigation

Preprocessing of the mail is blowing up with large ones.
The preprocessing we do with "swift soup" is blowing up not in a manner I can quickly optimize.

Proposed solution

Therefore I used an heuristic to disable preprocessing of emails larger than 5meg.
Works like a charm, email is still displayed resonably well, and some other mail clients use this trick.

“Possibly the most common error of a smart engineer is to optimise a thing that should not exist” - Musk

@adrien-coye adrien-coye added the enhancement New feature or request label May 25, 2023
@adrien-coye adrien-coye self-assigned this May 25, 2023
@adrien-coye adrien-coye force-pushed the largeComplexMailSlowToDisplay branch from 4daf2ad to c6b21c2 Compare May 25, 2023 10:12
MailCore/Utils/MessageBodyUtils.swift Outdated Show resolved Hide resolved
MailCore/Utils/MessageBodyUtils.swift Outdated Show resolved Hide resolved
@adrien-coye adrien-coye marked this pull request as ready for review May 25, 2023 10:17
@adrien-coye adrien-coye requested a review from a team as a code owner May 25, 2023 10:17
@sonarcloud
Copy link

sonarcloud bot commented May 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Ambrdctr Ambrdctr merged commit c0b0524 into master May 25, 2023
@Ambrdctr Ambrdctr deleted the largeComplexMailSlowToDisplay branch May 25, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants