When you run uv sync or uv pip install -r requirements.txt, a bunch of packages get installed.
You get a spinner, then a complete list of the packages installed; example:
While the total install time is a good metric to know, I would like to know the install time of each specific package. Even though this doesn't directly correlate with wall time, it would be great to identify the slowest packages to install and thus reducing install and build times.
A concrete example: pandas 1.3.5 takes forever to install. But if my project uses pandas==1.3.5 and anything else, say rich, then my uv sync --no-cache output looks like follows - how can I know it's pandas that made the sync take so long?
$ uv sync --no-cache
Using Python 3.8.12
Creating virtualenv at: .venv
Resolved 11 packages in 1ms
Built pandas==1.3.5
Prepared 10 packages in 3m 28s
Installed 10 packages in 131ms
+ markdown-it-py==3.0.0
+ mdurl==0.1.2
+ numpy==1.24.4
+ pandas==1.3.5
+ pygments==2.18.0
+ python-dateutil==2.9.0.post0
+ pytz==2024.1
+ rich==13.8.0
+ six==1.16.0
+ typing-extensions==4.12.2
I can identify that it's pandas that takes the longest to install, because it's where the spinner hangs for the longest, but I can't get that retrospectively in the logs.
Once I've identified that, I was able to upgrade it to a more recent version, that provides pre-built wheels which makes the install much faster (from 3min30 to 2sec) - so identifying which specific package takes long to install has a huge value.
I'd be happy with some --annotate-with-time flag if that works for you!
When you run
uv sync
oruv pip install -r requirements.txt
, a bunch of packages get installed. You get a spinner, then a complete list of the packages installed; example:While the total install time is a good metric to know, I would like to know the install time of each specific package. Even though this doesn't directly correlate with wall time, it would be great to identify the slowest packages to install and thus reducing install and build times.
A concrete example: pandas 1.3.5 takes forever to install. But if my project uses
pandas==1.3.5
and anything else, sayrich
, then myuv sync --no-cache
output looks like follows - how can I know it's pandas that made the sync take so long?I can identify that it's pandas that takes the longest to install, because it's where the spinner hangs for the longest, but I can't get that retrospectively in the logs. Once I've identified that, I was able to upgrade it to a more recent version, that provides pre-built wheels which makes the install much faster (from 3min30 to 2sec) - so identifying which specific package takes long to install has a huge value.
I'd be happy with some
--annotate-with-time
flag if that works for you!