SponsorBlockServer icon indicating copy to clipboard operation
SponsorBlockServer copied to clipboard

Improve speed of getTopUsers

Open ajayyy opened this issue 4 years ago • 3 comments

This is using up a lot of CPU

ajayyy avatar Sep 16 '20 17:09 ajayyy

You indexing on userID?

andrewzlee avatar Sep 16 '20 18:09 andrewzlee

Until we have redis implemented i would implement a simple X minute in-memory cache

MRuy avatar Oct 06 '20 14:10 MRuy

Redis is already implemented (at least in the code): https://github.com/ajayyy/SponsorBlockServer/blob/master/src/utils/youtubeAPI.js

It's just waiting for ajay to put it on the server.

Joe-Dowd avatar Oct 06 '20 22:10 Joe-Dowd