Is there any fastest way to calculate JS object size is greater than some small size (256kb).I can caputure it via some NPM or some rough method like How to get the size of a JavaScript object?
But as you know If I calculate some big file size eg:10 MB file It will die out memory for calculating some 10-1000 objects when it comes to bulk. I think of when ever it seems reach more than 256kb then it should stop further calculation of that file size and send as file is greater than that value.
OR
is that suggested method of calculating object size is working very fast enough for use in bulk operation ?
Here is my real problem:
I'm have some JS object (aws SES mail parameters) I have created a mail delivery pipeline via SQS for sending emails as for Rate limiting as this is bulk operation lead to aws SES rate limiting. But here aws SQS has problem like it only can hold less than 256 kb size object. for before put it into the queue I need to get JS object param size and make decision on whether I can be able to sent it to queue or not.