Tricks to make it faster?
Opened this issue · 3 comments
Hey there!
What a fun project!! I'm having loads of fun using it.
I want to render a page where there are many memes (well 12 really) , and this seems to almost take down the deployment (the cheapest Heroku Dyno).
What tricks can I use to make it lighter on the server?
Specifying smaller dimensions?
Upgrading the Heroku Dyno?
Thanks!
https://api.memegen.link is running as a single basic Dyno and handling about 2k requests per hour.
For the provided Procfile, the following environment variables are set:
MAX_REQUESTS=400
MAX_REQUESTS_JITTER=50
It's also running behind Cloudflare to cache images, but that shouldn't impact server performance for new images.
It's possible there could be a memory leak, though I suspect that would be in the image generation library (Pillow). Any investigation into that would be appreciated!