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

PDM doesn't benefit significantly from its cache #2801

Open
1 task done
deronnax opened this issue Apr 11, 2024 · 2 comments
Open
1 task done

PDM doesn't benefit significantly from its cache #2801

deronnax opened this issue Apr 11, 2024 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@deronnax
Copy link
Sponsor Contributor

  • I have searched the issue tracker and believe that this is not a duplicate.

Actual behavior

We did several tries to cache PDM cache on our Gitlab CI and we were surprised of how little it improved pdm sync performances. Until PDM 2.13, PDM was taking 1m57 to install our long list of dependencies, and 1m43 with a filled cache. Cache restauration time on our Gitlab is ~10 secondes so it was not worth it.
With PDM 2.13+, timing moved to 6m20 for an installation with empty cache to 4m35, so yes caching became finally worth it but you see the problem.

Expected behavior

I don't know if this can be fixed/improved. If you think you it can, that's awesome. If you think it's all normal, I'll close the issue.

Steps to reproduce

I did a small demonstration repo, pdm-cache-demonstrator , with a very simple reproducible case and long dependencies list, similar to the our production dependencies. There is a pdm cache info command before each pdm sync, and pdm sync is run with -v. We get somewhat similar results that what we experience, but less exacerbated:
pdm 2.12.4, empty cache: 1m38
pdm 2.12.4, filled cache: 0m57
pdm 2.13.3, empty cache: 2m37
pdm 2.13.3, filled cache: 2m9

Environment Information

For PDM 2.12:

root@02d0a41dda1d:/app/backend# pdm info && pdm info --env
PDM version:
  2.12.4
Python Interpreter:
  /app/backend/.venv/bin/python (3.11)
Project Root:
  /app/backend
Local Packages:

INFO: PDM 2.12.4 is installed, while 2.13.3 is available.
Please run `pdm self update` to upgrade.
Run `pdm config check_update false` to disable the check.
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.9",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "6.7.11-orbstack-00143-ge6b82e26cd22",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Sat Mar 30 12:20:36 UTC 2024",
  "python_full_version": "3.11.9",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "linux"
}

It would be the same for PDM 2.13

@deronnax deronnax added the 🐛 bug Something isn't working label Apr 11, 2024
@deronnax deronnax changed the title PDM doesn't benefice significantly from its cache PDM doesn't benefit significantly from its cache Apr 12, 2024
@sr-murthy
Copy link
Sponsor Contributor

@deronnax Just out of curiosity, have your steps been evaluated against the latest PDM release 2.14.0?

@deronnax
Copy link
Sponsor Contributor Author

Regarding caching, PDM 2.14.0 just reverts what was done in PDM 2.13, so I expect cache performance to be strictly the same than PDM 2.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants