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

ci(caching): restore package cache #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kwk
Copy link

@kwk kwk commented Nov 18, 2022

This adds a Restore cached dependencies step to the ci and cd jobs that tries to restored a cache of python packages (the ones stored in ~/.cache/pypoetry).

I've added it to my own small project and it resulted in a 26x performance boost when fetching python dependency packages (from 3:05minutes to 7seconds).

This will only work when people commit the poetry.lock file to their repo as described here.

Without caching:

Bildschirmfoto vom 2022-11-18 17-41-20

With caching:

Bildschirmfoto vom 2022-11-18 17-40-20

This adds a step to the ci and cd jobs that tries to restored a cache of
python packages (the ones stored in `~/.cache/poetry`).

I've added it to my own small project and it resulted in a 26x
performance boost when fetching python dependency packages (from
3:05minutes to 7seconds).

See kwk/ghgql#11 (comment)
@TomasBeuzen
Copy link
Collaborator

Hi @kwk - thanks very much for the PR! Just letting you know I've seen it. It's a good change and a small one - but I need to double check if I'll need to change anything in the py-pkgs book when merging this (I probably will want to add some text about this). I just went on parental leave, and may not get to this until the end of the year - but just wanted to jump on and say thanks, it's on my radar :)

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

Successfully merging this pull request may close these issues.

2 participants