oceanprotocol-archive / DAOBot

Web3 Glue for OceanDAO
6 stars 4 forks source link

Improve Proposal queries to make them lighter #176

Open idiom-bytes opened 2 years ago

idiom-bytes commented 2 years ago

Problem:

Updating all rows inside Proposals is causing unnecessary load, and potentially leading to issues with executing other actions. Also, we are currently experiencing more issues with timeouts, and all seem to be pointing towards heavy queries where we have not improved how we approach them.

Towards a solution:

In many cases there are optimizations that we can do, however we need to keep it manageable.

  1. Add a sleep or throttle of some sort to reduce load.
  2. Perhaps, only process individual projects that are submitting deliverables.

Constraint. KISS. Focus on migration to Mongo.

trentmc commented 2 years ago

This is only worth doing if # proposals grows substantially. Probably not gonna happen in the near term since funding $ is not growing