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

indexer: optimize idx.VoteList, etc performance #1389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

altergui
Copy link
Contributor

@altergui altergui commented Sep 12, 2024

this is basically the same optimization done for BlockList (the most affected endpoint) #1383 but extended to all endpoints

@coveralls
Copy link

coveralls commented Sep 12, 2024

Pull Request Test Coverage Report for Build 10901496990

Details

  • 165 of 213 (77.46%) changed or added relevant lines in 12 files are covered.
  • 20 unchanged lines in 12 files lost coverage.
  • Overall coverage decreased (-0.02%) to 62.267%

Changes Missing Coverage Covered Lines Changed/Added Lines %
vochain/indexer/process.go 20 21 95.24%
vochain/indexer/transaction.go 12 13 92.31%
vochain/indexer/vote.go 6 7 85.71%
vochain/indexer/indexer.go 18 21 85.71%
vochain/indexer/db/db.go 14 56 25.0%
Files with Coverage Reduction New Missed Lines %
vochain/indexer/db/token_fees.sql.go 1 84.0%
vochain/indexer/db/token_transfers.sql.go 1 69.12%
vochain/indexer/db/transactions.sql.go 1 92.23%
vochain/indexer/db/votes.sql.go 1 89.87%
vochain/indexer/process.go 1 74.68%
vochain/indexer/transaction.go 1 71.29%
vochain/indexer/vote.go 1 76.77%
api/accounts.go 2 68.43%
apiclient/account.go 2 38.32%
vochain/appsetup.go 2 58.88%
Totals Coverage Status
Change from base Build 10899531372: -0.02%
Covered Lines: 16901
Relevant Lines: 27143

💛 - Coveralls

* idx.TokenFeesList
* idx.TokenTransfersList
* idx.ProcessList
* idx.TransactionList (renamed from idx.SearchTransactions)
* idx.VoteList
* idx.AccountList

added a benchmark BenchmarkElectionList
@altergui altergui self-assigned this Sep 17, 2024
@altergui altergui marked this pull request as ready for review September 17, 2024 10:55
@altergui altergui requested a review from p4u September 17, 2024 11:01
@altergui
Copy link
Contributor Author

just in case, i've tested this with a new benchmark (BenchmarkElectionList) and confirmed a 10x improvement on that endpoint as well, no regressions

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