forked from tensaix2j/binacpp
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST requests extremely slow #18
Comments
This is because the CURL object is initialized/cleaned up for every single request. I made a modification to only perform the initialization once and it performed on par with the Python version. Pull request coming soon. |
alexanderkoumis
added a commit
to alexanderkoumis/binacpp
that referenced
this issue
Mar 20, 2018
Only instantiate curl object during BinaCPP::init Use faster/more robust std::string.append function in curl callback Fixes issue binance-exchange#18
Pull request merged |
Closed
This was referenced Oct 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This C++ API is slower than other Binance interfaces (python-binance) because of the poor performance of libcurl. I timed reading the
ticker/allBookTicker
endpoint from two small programs in both C++ (with this API) and python (using python-binance):The Python example grabs the data almost always 3-4x faster than the C++ code, with the Python code running in about 200ms and the C++ version taking ~800ms. This line, calling out to the libcurl API, is the slowest part of the binacpp library function. Why is libcurl so much slower here than the Python requests package?
The text was updated successfully, but these errors were encountered: