ditesh / node-poplib

POP3 client library for Node.js
MIT License
128 stars 44 forks source link

Popping large mails(more than 1MB) causing utilizing more CPU cycles #32

Open loharms opened 4 years ago

loharms commented 4 years ago

Hi Team,

I am using poplib node-module to fetch the mails from mail server. So to achieve it, I am using retr method. But if the mail size is greater than 1MB, its using more CPU cycles hence memory rise also. I observed that in retr method, there is a heavy string computation(substr and more than one indexOf) performed on the mail data retrieved from mail server. I assume this is causing the CPU to take more space and cycles.

I would like to understand this functionality and if anything can be done to fix the issue with rise in memory and CPU cycles.