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

Speed up GHA workflows #760

Open
sebffischer opened this issue Nov 3, 2023 · 6 comments
Open

Speed up GHA workflows #760

sebffischer opened this issue Nov 3, 2023 · 6 comments

Comments

@sebffischer
Copy link
Member

Because we render with --cache-refresh and we render to both pdf and html, all the code from the book is run twice in each workflow. This unnecessarily slows down the rendering time and we can / should do something about this.

@jemus42
Copy link
Member

jemus42 commented Nov 6, 2023

Why do we render with --cache-refresh on GitHub?

I know that option came up when we tried debugging people's issues with local rendering, where it made sense to occasionally throw out the cache.
On GitHub, I don't see what the benefit would be, as we explicitly cache things that need caching and any other caching mechanism outside of the GHA cache does not have an effect anyway, right?

@sebffischer
Copy link
Member Author

Yeah, I also though about this, at least we should run everything with --no-cache instead of --cache-refresh if we don't use the cache anyway

@jemus42
Copy link
Member

jemus42 commented Nov 6, 2023

Wouldn't that mean that the second rendering wouldn't benefit from the first one, so the code would still run twice per workflow?

@sebffischer
Copy link
Member Author

Yes, I think we should probably just enable caching. Currently we are not only not caching, we are creating a cache that we then throw away, which is like the worst thing we can do :D

@jemus42
Copy link
Member

jemus42 commented Nov 6, 2023

I'm wary of adding the quarto cache to the GHA cache and restore that - we'd surely get faster renders which would be nice, but I can already smell the accidentally-looking-at-old-version-of-things-that-were-cached-but-maybe-should-have-been-refreshed issues brewing 🥴

Or similarly, one of the myriad of potential issues that lead to use using the --cache-refresh locally by default might kick in and break builds, I guess?
Then again, there's a lot fewer changes happening now so maybe it's just fine.

@sebffischer
Copy link
Member Author

Yeah, I would not cache between workflows, but just within a workflow

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

No branches or pull requests

2 participants