-
Notifications
You must be signed in to change notification settings - Fork 648
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
Precalculate market ticker data #513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works really good and i like very much how it was implemented. the new index can be extended easy to make #512 and possible other similar that could be needed in the future.
in addition there is a nice increase in the speed of the calls, the new order book parameter does not affect current implementations as it is optional, the design is a lot better, etc.
not sure if @pmconrad haves time to take a look and check if we have anything missing but it looks all positive from here.
I've glanced over the changes, but it's a lot more than I expected... Wrt the benchmark - connection setup is always quite expensive. For comparison, 1000x curl against a locally running apache just took 12 seconds on one of my servers. A test using a websocket connection should provide more meaningful results. |
The websocket test will be a good one if we assume for example the same application is getting the tickers for all the crosses. Will probably do this using the same connection websocket. The curl one is also a good one for cases where we are having multiple clients calling at the same time. Scripting a websocket can be done with https://github.com/bitshares/bitshares-core/wiki/Scripting-websockets-easy Ill try to get a small script to measure the time in the same connection. |
made a test with websockets by calling 1000 times. node with changes:
here is against a node without the changes:
for reference i am attaching the script:
|
We have no unit test for any market related stuff. We do have for account_history but nothing for market or trading. I think we can take this opportunity and create unit tests for the market api calls. It will need some work as we need to fill buckets and such from the @abitmore let me know if you want me to get started with that, if you think it will worth or if you prefer to make the first market test. another thing i noticed is that the |
|
Merging this one. Created a new ticket (#523) for the unit testing thing. |
PR for #509.
Benchmark:
API query speed slightly increased.
By the way, it seems the overhead is quite high, even an empty query takes around 5 seconds to complete (1000 times). I'm not sure why.