this PR has a major rewrite of many DB call methods. As for right now the methods are not well documented and there is lots of code that may seem repetitive. I will create a new PR focused on solving both of those problems. Originally I was going to write in this PR, but since this PR is already very big, I decided that is better to put in a different PR;
the main changes are:
allow caps g while call !points with the g-flag;
makes all the work of sorting, filtering and reconstructing the data happen in the DB side for many functions.
makes the instantiation of pupeteer happen only once and share the same instance between calls.
the move of work to the DB should improve speed considerably, specially the larger the data, which happens every time anyone gives a point or enters the group. the sharing of a single pueteer instance will make the command faster, since the instantiation at each call was the main culprit of making it slow.
the command itself is faster now, however, there is something that is making it slower in the very first call that is neither related to the DB calls related to the DB nor to pupeteer. I'll investigated this later and create a different PR for that issue;
this PR has a major rewrite of many DB call methods. As for right now the methods are not well documented and there is lots of code that may seem repetitive. I will create a new PR focused on solving both of those problems. Originally I was going to write in this PR, but since this PR is already very big, I decided that is better to put in a different PR;
the main changes are:
!points
with the g-flag;pupeteer
happen only once and share the same instance between calls.the move of work to the DB should improve speed considerably, specially the larger the data, which happens every time anyone gives a point or enters the group. the sharing of a single pueteer instance will make the command faster, since the instantiation at each call was the main culprit of making it slow.
the command itself is faster now, however, there is something that is making it slower in the very first call that is neither related to the DB calls related to the DB nor to pupeteer. I'll investigated this later and create a different PR for that issue;
closes #74 #71 #68 #67