e1547
e1547 copied to clipboard
Use combined API calls for single tag follows
Currently the loading of the follows tab is extremely slow. Seems like you're sending a seperate request for every tag to e621. Can't it be done that all singular normal tags are sent in one big request using the ~ prefix? (https://e621.net/help/cheatsheet#searching_basics) Would already make it a lot faster in my case.
to implement this we need to:
- collect all single tag follows
- chunk them into packages of max 40, but evenly distributed (example: 60 should be [30,30] not [40,20])
- make requests with limit 200, resulting in a desired 5 posts of each tag (because of how ~ works, this does not guarantee any posts for a tag, however)
- split the result by tag (simply iterate and check for the tag) and notify the follows
- if a tag has gotten no posts in the result or if all posts in the result are new, make a separate request for that tag
- finally, process all the multi-tag follows with a single request each