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

Add caching and improve /tabs-counters performance #8512

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

nikitosing
Copy link
Member

@nikitosing nikitosing commented Sep 22, 2023

Motivation

Sometimes coin balances counter query consumes too much time
2023-09-17T08:36:27.886 application=explorer [info] Time consumed for coin_balances_count_task for 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506 is 14084ms

Changelog

  • Limit all queries with 1 second, and leave them after timeout untill completion (result will be stored in ets cache)
  • Add ets cache for address tabs counters
  • Remove coin balances counter from /tabs-counters endpoint
  • Add ADDRESSES_TABS_COUNTERS_TTL env
    Add ADDRESSES_TABS_COUNTERS_TTL env docs#191

Checklist for your Pull Request (PR)

@nikitosing nikitosing changed the title Remove coin_balances_count from /tabs-counters Add caching and improve /tabs-counters performance Oct 4, 2023
Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add ADDRESSES_TABS_COUNTERS_TTL to common-blockscout.env and to the docs repo

@vbaranov vbaranov merged commit 73ad933 into master Oct 20, 2023
15 checks passed
@vbaranov vbaranov deleted the np-cut-heavy-counter branch October 20, 2023 09:47
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