ditesh / node-poplib

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

Very slow when RETRing large mails (~10MB) #30

Open NijiharaTsubasa opened 6 years ago

NijiharaTsubasa commented 6 years ago

I already find out that the problem is the cost of string concatenate on large strings.

But I have no idea how to fix it. I changed the string concatenate to buffer concatenate and it's still slow.

Maybe pre-allocate a big buffer for receive server data and write to it instead of concat strings every time?