talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia-labs.github.io/talaia.watch/
MIT License
135 stars 63 forks source link

Avoid having to hit the db if there is no data to delete #104

Closed sr-gi closed 2 years ago

sr-gi commented 2 years ago

Currently, DBM::batch_remove_{appointments, users} was being hit even if there was no data to delete. This also applied to trying to delete data from memory, but the latter was less of an issue.

While this was not a thread by itself (no data was actually being deleted), it was certainly wasteful.