Skip to content
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

Fix slow loading of charts on markets page for popular trading pairs #285

Merged
merged 1 commit into from Nov 27, 2019

Conversation

wiz
Copy link
Member

@wiz wiz commented Nov 12, 2019

[Background]
The Bisq Website features a /markets page which fetches historical trade and live offer data from the Bisq Markets API, and plots the data on graphs and tables. This page is located at https://bisq.network/markets

[Issue]
A few markets on Bisq have become quite popular, such as USD, EUR, and XMR. For these busier markets, the full data is now quite heavy because the website requests data with interval=minute - the responses have reached several MB in size. The result is that these busy market pages are slow to load:
https://bisq.network/markets/?currency=btc_usd
https://bisq.network/markets/?currency=btc_eur
https://bisq.network/markets/?currency=xmr_btc

[Fix]
By changing the data from interval=minute to interval=day the response size returns to a more reasonable size (100KB ~ 300KB). The tradeoff is that some charts will have slightly lower resolution due to the smaller datapoints, but the charts will load instantly instead of the current several second load time.
https://deploy-preview-285--bisq-website.netlify.com/markets/?currency=btc_usd
https://deploy-preview-285--bisq-website.netlify.com/markets/?currency=btc_eur
https://deploy-preview-285--bisq-website.netlify.com/markets/?currency=xmr_btc

@wiz wiz changed the title Use interval=day instead of interval=minute for /api/hloc query Fix slow loading of charts on markets page for popular trading pairs Nov 27, 2019
@wiz wiz force-pushed the tweak-markets-charts-query branch from 8265562 to 41b0015 Compare November 27, 2019 07:27
@wiz wiz force-pushed the tweak-markets-charts-query branch from 41b0015 to ac8b476 Compare November 27, 2019 07:32
@wiz wiz marked this pull request as ready for review November 27, 2019 07:37
@m52go
Copy link
Contributor

m52go commented Nov 27, 2019

Much quicker!

@m52go
Copy link
Contributor

m52go commented Nov 27, 2019

ACK

@m52go m52go merged commit 848f628 into bisq-network:master Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants