Closed synrg closed 2 years ago
With recent work on ,user list
that improves the performance by preloading all users not in the server projects at once, this is no longer needed:
/v1/observations/observers?user_id=#,#,#,...
/v1/users/#
request per userAs of 2022-03-01 on iNaturalist Discord, there dozens and dozens of users that fall in the second category, and they are all loaded very rapidly in a single request. There are only a handful of users in the last category, so that the initial ,user list
will pause several seconds as each of those are loaded, rate-limited to one per second. That means the first time you do the ,user list
command after the cog has been loaded, it pauses for about 12 seconds.
In time, the number of users that don't have observations and who aren't in any of the projects might get to be too much of a drag on resources. For that, there are a couple of potential fixes:
,user remove
them
Make
[p]user list
no longer automatically fetch users not currently cached. If there is a cache miss, then only show the Discord name & inat user id# (which is a link to their profile on iNat by id#). Such users are typically those that are known to the bot but are not in the user projects.The idea is that
[p]user list
should never be slowed down by users that are no longer in the projects, but should still list every user known to the bot who is still a member of the server where the command is run.A mod doing a review of the list can either just click the link to their profile to see who they are, or else use
[p]user show
to load the record from iNat into the cache.