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

Make status significantly faster #149

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Make status significantly faster #149

merged 1 commit into from
Sep 5, 2024

Conversation

jbrower95
Copy link
Contributor

@jbrower95 jbrower95 commented Sep 5, 2024

Summary

  • We were overfetching GetOnchainValidatorInfo multiple times in status, due to a regression introduced in one of our PRs.
  • This PR changes our filtering functions to act on raw data (without fetching / side effects), and pulls our data fetching out into a separate call. This should make status about 60~ cheaper to run on average, in terms of network calls.

Results

Before: ./cli status --podAddress 0x2641C2ded63a0C640629F5eDF1189e0f53C06561 9.57s user 9.35s system 4% cpu 7:38.89 total (458s)
After: ./cli status --podAddress 0x2641C2ded63a0C640629F5eDF1189e0f53C06561 7.24s user 6.09s system 4% cpu 4:52.41 total (292s)

Overall about a 36% reduction in time for the command.

@jbrower95 jbrower95 marked this pull request as ready for review September 5, 2024 21:55
@jbrower95 jbrower95 requested a review from wadealexc September 5, 2024 22:05
@jbrower95 jbrower95 merged commit fd4d0cd into master Sep 5, 2024
4 checks passed
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