httpie / cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.
https://httpie.io
BSD 3-Clause "New" or "Revised" License
33.37k stars 3.67k forks source link

latency compared to cURL #629

Closed alexander-riss closed 6 years ago

alexander-riss commented 6 years ago

i noticed that httpie introduces a significant latency compared to using plain cURL.

calling the same URL in cURL vs httpie is about 400 ms slower in httpie.

is there any way to smooth this to make it a more "instant" experience?

sigmavirus24 commented 6 years ago

@alexander-riss there are many factors that can contribute to that extra 400ms:

  1. What version of python you're using
  2. What versions of httpie and its dependencies you have installed
  3. What version of openssl you have (and many more)

"Please shave off 400ms on my computer" is practically impossible with what you've provided us. Please provide more detail.

alexander-riss commented 6 years ago

Python 2.7.10 (default, Feb 7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin Python 3.6.3 httpie 0.9.9 (installed via brew)

the connection was against a non SSL localhost server - so not sure if this would be relevant?

sigmavirus24 commented 6 years ago

the connection was against a non SSL localhost server - so not sure if this would be relevant?

It is relevant.

jkbrzt commented 6 years ago

@alexander-riss Possible cause: https://github.com/jakubroztocil/httpie/issues/603. I'd recommend upgrading to Python 3 (default for Homebrew installs). Please feel free to reopen this issue if the problem persists.