mapbox / mapbox-cli-py

Command line interface to Mapbox Web Services
MIT License
164 stars 44 forks source link

No more subcommand plugins #95

Closed sgillies closed 7 years ago

sgillies commented 7 years ago

This means that the 'mapbox' command is no longer pluggable. It also means that we can eliminate the overhead of scanning the PYTHONPATH for mapbox subcommand entry points. mapbox commands launch more quickly.

Additionally, we can launch even more quickly by executing the mapboxcli module directly. Users may find that python -m mapboxcli --help executes almost twice as fast as mapbox --help.

sgillies commented 7 years ago

For the code in this PR I get

$ time mapbox --help >& /dev/null

real    0m0.277s
user    0m0.242s
sys     0m0.029s

instead of the 0m0.481s for mapboxcli 0.6.0. python -m mapboxcli --help is not significantly faster for lightly provisioned environments. For heavily provisioned enviroments, python -m mapboxcli --help can be almost twice as fast as mapbox --help.