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

Reduce jq(1) invocations to improve speed #62

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

Conversation

aaronNGi
Copy link

When listing the mails of an inbox, the script used 1 jq(1) plus 4 more for each mail. When displaying the contents of a mail, jq(1) was called 4 or 5 times plus 1 for every attachment.

This reduces the amount of calls to 1, except when printing a mail with attachments in raw_text mode, in which case there will be 2 calls. That should greatly speed things up, when printing a large inbox or a mail with many attachments.

When listing the mails of an inbox, the script used 1 jq(1) plus 4 more for each mail. When displaying the contents of a mail, jq(1) was called 4 or 5 times plus 1 for every attachment.

This reduces the amount of calls to 1, except when printing a mail with attachments in raw_text mode, in which case there will be 2 calls. That should greatly speed things up, when printing a large inbox or a mail with many attachments.
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.

1 participant