Skip to content

Speed up GetCommittableBalance #2962

Description

@trajan0x

image

As I was going through a trace to look for speedup opps I've realized 90% of our latency exists in a single sql query:

SELECT * FROM request_for_quotes WHERE status IN (5,6,7)

This query is called in GetCommittableBalances which is called in HasSufficientGas which in turn is called twice sequentially (#2960).

Amazingly, it's then called a third time in forward-Seen:

image

Moving on to forward-ComimttedPending we call it 2x more sequentially

image

Then again in 2x more in forward-CommittedConfirmed:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions