Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop using screenshot api #23

Open
levino opened this issue Nov 26, 2023 · 1 comment
Open

stop using screenshot api #23

levino opened this issue Nov 26, 2023 · 1 comment

Comments

@levino
Copy link
Collaborator

levino commented Nov 26, 2023

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.

@thomasdavis
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants