pdm icon indicating copy to clipboard operation
pdm copied to clipboard

PDM is slow on Raspberry Pi Zero (on SD card)

Open stepanselyuk opened this issue 4 years ago • 1 comments

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

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

In general, any PDM command is slow, e.g. pdm --version takes 14 seconds. I've checked with strace and there are many syscalls like stat64("/usr/lib/python3.9...., and IOPS even of the best SD cards is 25-30.

root@stephen-rpi-led:~# strace pdm --version |& grep -c 'stat64("/usr/lib/python3.9'
3201

root@stephen-rpi-led:~# strace pdm --version |& grep -c 'openat([^"]*"/usr/lib/python3.9'
982

Actual behavior

pdm command is slow

Expected behavior

pdm command is fast

Environment Information

time $(pdm info && pdm info --env)
[ProjectError]: The pyproject.toml has not been initialized yet. You can do this by running 'pdm init'.

real    0m25.472s
user    0m12.565s
sys     0m0.574s
root@stephen-rpi-led:~# vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0  26324  85308  29436 281260    1   12    57    81  197  303 83  8 10  0  0
 
root@stephen-rpi-led:~# free -m
              total        used        free      shared  buff/cache   available
Mem:            430          30          95           7         303         159
Swap:            99          25          74

Also CPU usage 100% for time of executing pdm --version

stepanselyuk avatar Oct 14 '21 13:10 stepanselyuk

As Linux caching files in RAM, probably it's not the SD card performance issue.

stepanselyuk avatar Oct 14 '21 13:10 stepanselyuk

@stepanselyuk Any chance trying the latest version to see if it is still slow?

frostming avatar Sep 27 '22 08:09 frostming