-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
refactor: use http-cache for caching, optimize network calls #304
Conversation
Very rough benchmark: export GH_TOKEN=$(gh auth token)
time zizmor pypa/pip-audit With a release build of Versus this branch, release build:
...averages about 16s on a cold cache. However, once warmed up, it takes ~700ms to run. So, slightly slower on a cold run, but significantly faster on subsequent runs. |
Not sure this matters, given that it's all essentially serialized to the same thread anyways.
With that, the runs on this branch are now around 12.5s for me locally. So that "pays" for the change here, even if it's not directly caused by it. |
|
Final savings here, with a cold cache:
versus current release (0.9.2):
...so about 40% faster in the cold case. In the hot case, we're 90% faster (although most users won't fully see this, since they won't be running |
I'm not 100% sure if this makes sense yet. Need to do some performance measurements.
TODOs:
./http-cache
(should probably be~/.cache/zizmor
by default or similar)Fixes #52.