Comment by creesch on 07/03/2022 at 19:07 UTC

17 upvotes, 2 direct replies (showing 2)

View submission: Announcing Mod Notes

View parent comment

That and to also allow third party tools in general to respect the API rate-limit better.

Imagine that if a busy comment section is loaded on a subreddit someone mods. The way the API is set up now, we basically have to hit the get endpoint for each individual user. Then if the page is reloaded we either need to have everything cached and only hit the API for users we haven't checked before (and eventually hit the api again for all users anyway) or simply check all users again. Frankly, I am not sure we can actually reasonably implement modnotes in toolbox and fully respect the API rate limits.

If we had a list of users with known notes we could simply first check all users on page against that list and only fetch the notes for those users that have them. We are basically talking about hundreds or possibly thousands of API requests versus a handful.

Replies

Comment by w-summon at 07/03/2022 at 22:01 UTC

10 upvotes, 0 direct replies

Thanks for the explanation, very helpful! Going to note this as we continue to iterate on Mod Notes and the API.

Comment by Watchful1 at 07/03/2022 at 19:22 UTC

7 upvotes, 1 direct replies

Or maybe a bulk endpoint? Just pass a list of up to a hundred users and get all their notes back.