[performance] temporarily cache account status counts to reduce no. account counts (#2620)

* temporarily cache account status counts to reduce no. account counts

* whoops, forgot to initAccountCounts()

* use already fetched cache capacity value

* make cache a ptr type

* whoops, use count instead of just select

* fix to correctly use the transaction

* properly wrap that tx 😇

* correctly wrap both tx types

* outline retryOnBusy() to allow the fast path to be inlined

* return err on context cancelled

* remove unnecessary storage of context in stmt, fix Exec and Query interface implementations

* shutup linter
This commit is contained in:
kim
2024-02-12 11:52:12 +00:00
committed by GitHub
parent b2675047cb
commit ede8f43635
5 changed files with 199 additions and 38 deletions

View File

@@ -51,6 +51,7 @@ func (c *Caches) Init() {
log.Infof(nil, "init: %p", c)
c.initAccount()
c.initAccountCounts()
c.initAccountNote()
c.initApplication()
c.initBlock()