melodic-thailand-9922709/02/2021, 5:04 PM
python_library() pex_binary(entry_point="main.py", name="bin")
However running it takes ~2 seconds:
Am I doing something wrong or should I expect a big penalty from pex binaries?
./pants run bins:bin 0.59s user 0.15s system 37% cpu 1.984 total
hundreds-father-40409/02/2021, 5:10 PM
melodic-thailand-9922709/02/2021, 5:26 PM
$ time ./pants --version 2.7.0rc0 real 0m0.832s user 0m0.549s sys 0m0.125s
gets a hit of 600-900ms
hundreds-father-40409/02/2021, 5:36 PM
witty-crayon-2278609/02/2021, 5:40 PM
to build the binary, and then run the binary independently
mode should be ~as fast as a venv.
hundreds-father-40409/02/2021, 5:43 PM
. As explained there,
will get you the fastest subsequent runs after an initial run