jsonresume.org icon indicating copy to clipboard operation
jsonresume.org copied to clipboard

stop using screenshot api

Open levino opened this issue 1 year ago • 1 comments

I just had a look at the setup for the preview images for https://jsonresume.org/themes/. The images are generated via a function using https://github.com/thomasdavis/screenshot. The results are cached for 1 day. When I look into vercels billing report, the function calls to this function still are the biggest burden on the plan. Might be the case that the data cache is too small, might be the case that these computations are very expensive. I would stop generating these images on the fly (since the themes usually will change way less often than daily) and generate them, when I rebuild the homepage / registry, because if the registry uses a new version of a theme, it can only happen, when we rebuild the registry after changes to master. In order to make this process of prerendering these images at build time easy, I would first migrate from jekyll to astro where doing things like "calling puppeteer to generate some images on build time" is a piece of cake.

levino avatar Nov 26 '23 12:11 levino

Sounds good. Can also just change the cache expire to two months in the interim

thomasdavis avatar Nov 27 '23 12:11 thomasdavis