You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing out lambda-warmer with a concurrency of 2 and I could not figure out why it was upwards of 2 seconds to run. By
adding let lambda = null; to the top of index.js and
changing line 81 to be
if(!lambda){
lambda = require('./lib/lambda-service');
}
It cuts down on the time needed to run each subsequent warming ping by a lot because it will only load the library once.
With this change I am seeing much quicker run times which will save money. I wanted to put in a PR but didn't have permission.
The text was updated successfully, but these errors were encountered:
Sure! I made a pr, Thanks for making this library it's pretty much exactly what I was thinking I was going to have to make and it's a lot cheaper to keep lambda warm than provisioned concurrency.
I was testing out lambda-warmer with a concurrency of 2 and I could not figure out why it was upwards of 2 seconds to run. By
adding let lambda = null; to the top of index.js and
changing line 81 to be
if(!lambda){
lambda = require('./lib/lambda-service');
}
It cuts down on the time needed to run each subsequent warming ping by a lot because it will only load the library once.
With this change I am seeing much quicker run times which will save money. I wanted to put in a PR but didn't have permission.
The text was updated successfully, but these errors were encountered: