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

ZMS-109 #597

Merged
merged 4 commits into from Jan 5, 2024
Merged

ZMS-109 #597

merged 4 commits into from Jan 5, 2024

Conversation

NickOvt
Copy link
Contributor

@NickOvt NickOvt commented Jan 4, 2024

Try to reduce the amount of call to JSON.parse in order to improve the idle CPU performance of wildduck when a lot of connections are open. Also reduce the amount of empty emits by listeners

@NickOvt NickOvt requested a review from andris9 January 4, 2024 11:45
@NickOvt NickOvt self-assigned this Jan 4, 2024
lib/imap-notifier.js Outdated Show resolved Hide resolved
lib/imap-notifier.js Outdated Show resolved Hide resolved
@NickOvt NickOvt requested a review from andris9 January 5, 2024 08:24
@NickOvt
Copy link
Contributor Author

NickOvt commented Jan 5, 2024

based on testing (4500 requests each for creating a message (has no payload) and logging out (has payload))
Performance has improved 2x-3x fold in case of no payload that is only .e and no parsing is needed.
Performance is the same or 100ns faster in case when data has the payload.

@NickOvt NickOvt merged commit 5721047 into master Jan 5, 2024
7 checks passed
@NickOvt NickOvt deleted the ZMS-109 branch January 5, 2024 08:31
@andris9
Copy link
Member

andris9 commented Jan 5, 2024

based on testing (4500 requests each for creating a message (has no payload) and logging out (has payload)) Performance has improved 2x-3x fold in case of no payload that is only .e and no parsing is needed. Performance is the same or 100ns faster in case when data has the payload.

The no-payload version happens way more, as it is triggered any time something happens on the email account, e.g. an email is marked as seen or unseen. So if this use case gets optimized it is a great win 🏆

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

2 participants