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 performance of the balance changing history list loading #3140

Merged

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Jun 2, 2020

#1946

Should be merged after #3125

Motivation

Balance changing history list (which is under balance history chart) loading at Coin Balance History tab is very slow.

Changelog

Eliminate joining to Blocks table in the query to find the list of balance changes by finding min/max blocks in the list and interpolate blocks timestamps using those min and max numbers.

Checklist for your Pull Request (PR)

@coveralls
Copy link

coveralls commented Jun 2, 2020

Pull Request Test Coverage Report for Build 9fb7df04-9aea-499f-9dee-4d77c3523b74

  • 3 of 27 (11.11%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.2%) to 74.897%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/explorer/lib/explorer/chain.ex 0 24 0.0%
Files with Coverage Reduction New Missed Lines %
apps/block_scout_web/lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 1 78.57%
apps/explorer/lib/explorer/chain.ex 2 75.14%
Totals Coverage Status
Change from base Build f94dc271-8c5a-4cda-a8b4-3d791ee6a587: -0.2%
Covered Lines: 5833
Relevant Lines: 7788

💛 - Coveralls

@vbaranov vbaranov force-pushed the vb-fix-performance-coin-balance-history-nnew-wave-under-chart branch from ee44517 to 4cd5568 Compare June 2, 2020 12:34
@vbaranov vbaranov self-assigned this Jun 2, 2020
@vbaranov vbaranov merged commit 02ac0a3 into master Jun 2, 2020
@vbaranov vbaranov deleted the vb-fix-performance-coin-balance-history-nnew-wave-under-chart branch June 2, 2020 16:07
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.

2 participants