fresh-cat-90827
07/10/2024, 9:49 PM$ pants list :: | wc -l
12441
๐งตfresh-cat-90827
07/10/2024, 9:49 PM$ time pants --no-pantsd --no-local-cache dependencies :: > /dev/null
pants --no-pantsd --no-local-cache dependencies :: > /dev/null 476.89s user 1683.80s system 239% cpu 15:01.16 total
2.19.1 (with Rust parser)
$ time pants --no-pantsd --no-local-cache dependencies :: > /dev/null
pants --no-pantsd --no-local-cache dependencies :: > /dev/null 71.39s user 19.78s system 145% cpu 1:02.73 total
15 times faster to scan dependencies? Or am I doing something wrong running these comparisons?fresh-cat-90827
07/10/2024, 9:50 PMwide-midnight-78598
07/10/2024, 10:02 PMPants 2.17 introduced a new paradigm to dependency parsing for Python by leveraging a Rust-based parser that's called in the same process as Pants itself, instead of farming out to one-python-process-per-file.
As a result of the switch, cold-cache performance improved by a factor of about 12x, while hot-cache had no difference. Additionally, Pants can now infer dependencies from Python scripts with syntax errors.
After leaving this defaulted to disabled for a release cycle, Pants 2.18 started defaulting to enabling this.wide-midnight-78598
07/10/2024, 10:02 PMfresh-cat-90827
07/10/2024, 10:15 PM