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

Parse only 10 mimeparts #53

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Parse only 10 mimeparts #53

wants to merge 1 commit into from

Conversation

froxCZ
Copy link
Contributor

@froxCZ froxCZ commented Sep 10, 2021

Tested locally, email was still received. Will merge after tested in prod.

for idx, mimepart in enumerate(
parsed.walk(with_self=parsed.content_type.is_singlepart())
):
if idx >= 10:
Copy link
Member

Choose a reason for hiding this comment

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

@thomasst Should we create an issue in this repo for this to further improve it? Would we want sync-engine to still create snippets but have an option to turn that functionality off?

Copy link
Member

Choose a reason for hiding this comment

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

  • We should split out higher level email parsing (that we use in Close) into a separate library. Flanker has its issues and I think we shouldn't use it.
  • I don't see much value in the snippet. In general it depends on what use cases we want to support with sync-engine. For example, we don't need to store or search attachments and bodies, but not every user of sync-engine might want to re-parse emails.

@froxCZ froxCZ mentioned this pull request Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants