wow I haven't seen this performance differences (d...
# development
f
wow I haven't seen this performance differences (doing dependency inference) between 2.17 and 2.18 when I ran the experiments a while ago. As a teaser, my giant repo:
Copy code
$ pants list :: | wc -l                   
12441
๐Ÿงต
๐ŸŽ‰ 2
2.18 (without Rust parser)
Copy code
$ 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)
Copy code
$ 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?
If not, that's pretty much awesome.
w
Copy code
Pants 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.
Copy code
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.
Copy code
After leaving this defaulted to disabled for a release cycle, Pants 2.18 started defaulting to enabling this.
Seems pretty in-line with expectations :)
f
yes, I saw this in the docs, but thought this didn't apply to us since I haven't seen this boost when comparing 2.17 and 2.18 (with Rust parser enabled)