SLPB-6: Optimize *InsertReplace operations in SLPDB
SLPDB currently performs much extra work than needed resulting in reduced performance due to to InsertReplace operations in db.ts. If these were optimized SLPDB could support more transactions per second. In handleMempoolTransaction¬† UpdateStatistics is called which performs a graphInsertReplace, for larger tokens this takes a long time.
- Refactor code to only have to insert or delete the necessary documents
- Provide benchmarking results using the timings from running regtest tests
- Ensure SLPDB has same overall functionality as before (i.e. compare documents to another instance)
If you are interested in being eligible for this bounty, please contact @jscramer or @Blockparty_sh on Telegram before doing any work.