Generating 1200x1200 10,000 unique images in lambda.
I'm using lambda for this one, I'm generating 1200x1200 10,000 unique images but it reaches the timeout limit.
Any recommendation to make this faster? without removing status updates.
6 Replies
I don't have any experience with lambdas or js canvas api but just to spitball some ideas
1. you could reimplement it in a faster language
2. WebGL?
3. screw making it faster and just have the lambda call out to a different lambda which generates one image 10,000 times
I think one image per lambda call is crazy. Currently it can generate around 4200 images, almost half, when generating 1200x1200 10,000 images before it reaches the 15 minutes timeout. Let me know your thoughts šš¼
then just make a version of the lambda that can generate some number specified images and make however many calls to that lambda from the main lambda you need to get everything done fast enough, 2 calls generating 4k each then 1 more generating the last 2k
or maybe 5 calls generating 2k
take the first lambda, and spawn N more lambdas do handle the image generations
Web Dev Cody
YouTube
This is how we generate thousands of pdfs in seconds at work
š T3 Stack Tutorial: https://1017897100294.gumroad.com/l/jipjfm
š¤ SaaS I'm Building: https://www.icongeneratorai.com/
š¬ Discord: https://discord.gg/4kGbBaa
š Newsletter: https://newsletter.webdevcody.com/
š GitHub: https://github.com/webdevcody
šŗ Twitch: https://www.twitch.tv/webdevcody
š¤ Website: https://webdevcody.com
š¦ Twitter: https://twitt...
kinda like this