rik079 / Speasier

Speak easier in Speasy. A.k.a Sock's Speaking Slave.
https://speasier.rik079.xyz
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Store who uses what voice in RAM #40

Closed rik079 closed 3 years ago

rik079 commented 3 years ago

So we don't have to constantly query the database on HDD/SSD all the time, reduces latency between enter and the start of the message being sent in the voice channel a bit. I guess the best way to do this is to create a :memory: database, and once a user starts speaking for the first time after the bot has been restarted, a copy of their profile is stored in this DB. this way, we only need to lookup the voice from the DB file outside of memory once, until the bot has to restart

Worthy-Alpaca commented 3 years ago

I disagree. I think we should simply do the DB query simultaneously to the API call to Polly. That way we don't need to use RAM.