e1547 icon indicating copy to clipboard operation
e1547 copied to clipboard

Use combined API calls for single tag follows

Open TDOWuser opened this issue 2 years ago • 1 comments

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.

TDOWuser avatar Jun 28 '22 14:06 TDOWuser

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

clragon avatar Jul 11 '22 10:07 clragon